-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adapt unit tests to new session retry handling
- Loading branch information
Showing
3 changed files
with
7 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
# | ||
|
@@ -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}, | ||
) | ||
|
@@ -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}, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
# | ||
|
@@ -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}, | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
# | ||
|
@@ -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}, | ||
) | ||
|