Skip to content

Commit

Permalink
feat: adapt unit tests to new session retry handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tngraf committed Apr 22, 2024
1 parent 5664ba7 commit c223886
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions tests/test_check_bom_item_status.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------------
# Copyright (c) 2023 Siemens
# Copyright (c) 2023-2024 Siemens
# All Rights Reserved.
# Author: [email protected]
#
Expand Down Expand Up @@ -299,7 +299,7 @@ def test_simple_bom_with_errors(self) -> None:
responses.GET,
url=self.MYURL + "resource/api/releases/05c30bf89a512463260b57e84d99b38f",
body='{"name": "python", "version": "3.8"}',
status=500, # internal server error
status=592, # 500 => 592 = MaxRetryError, due to new sw360 session handling
content_type="application/json",
adding_headers={"Authorization": "Token " + self.MYTOKEN},
)
Expand Down Expand Up @@ -419,7 +419,7 @@ def test_simple_bom_without_id_with_errors(self) -> None:
}
} ]
}}''',
status=500,
status=592, # 500 => 592 = MaxRetryError, due to new sw360 session handling
content_type="application/json",
adding_headers={"Authorization": "Token " + self.MYTOKEN},
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_get_license_info.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------------
# Copyright (c) 2023 Siemens
# Copyright (c) 2023-2024 Siemens
# All Rights Reserved.
# Author: [email protected]
#
Expand Down Expand Up @@ -197,7 +197,7 @@ def test_error_getting_project(self) -> None:
"sw360:releases": []
}
},
status=500,
status=592, # 500 => 592 = MaxRetryError, due to new sw360 session handling
content_type="application/json",
adding_headers={"Authorization": "Token " + self.MYTOKEN},
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_script_base.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -------------------------------------------------------------------------------
# Copyright (c) 2023 Siemens
# Copyright (c) 2024 Siemens
# All Rights Reserved.
# Author: [email protected]
#
Expand Down Expand Up @@ -179,7 +179,7 @@ def test_find_project_fail_sw360_error(self) -> None:
"sw360:projects": []
}
},
status=500,
status=592, # 500 => 592 = MaxRetryError, due to new sw360 session handling
content_type="application/json",
adding_headers={"Authorization": "Token " + self.MYTOKEN},
)
Expand Down

0 comments on commit c223886

Please sign in to comment.