-
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.
test: get rid of json_params_matcher deprecation warning
- Loading branch information
Showing
6 changed files
with
27 additions
and
26 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
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) 2020 Siemens | ||
# Copyright (c) 2020-2023 Siemens | ||
# All Rights Reserved. | ||
# Author: [email protected] | ||
# | ||
|
@@ -310,7 +310,7 @@ def test_update_component_external_id_add_fresh_id(self): | |
url=self.MYURL + "resource/api/components/bc75c910ca9866886cb4d7b3a301061f", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher({"externalIds": {"already-existing": "must-be-kept", "package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
responses.matchers.json_params_matcher({"externalIds": {"already-existing": "must-be-kept", "package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
] | ||
) | ||
|
||
|
@@ -365,7 +365,7 @@ def test_update_component_external_id_overwrite(self): | |
url=self.MYURL + "resource/api/components/bc75c910ca9866886cb4d7b3a301061f", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher({"externalIds": {"package-url": "new-one"}}) | ||
responses.matchers.json_params_matcher({"externalIds": {"package-url": "new-one"}}) | ||
] | ||
) | ||
|
||
|
@@ -398,7 +398,7 @@ def test_update_component_external_id_delete(self): | |
url=self.MYURL + "resource/api/components/bc75c910ca9866886cb4d7b3a301061f", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher({"externalIds": {}}) | ||
responses.matchers.json_params_matcher({"externalIds": {}}) | ||
] | ||
) | ||
|
||
|
@@ -431,7 +431,7 @@ def test_update_component_external_id_no_exist(self): | |
url=self.MYURL + "resource/api/components/bc75c910ca9866886cb4d7b3a301061f", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher( | ||
responses.matchers.json_params_matcher( | ||
{ | ||
"externalIds": {"xxx": "pkg:deb/debian/debootstrap?type=source"} | ||
} | ||
|
@@ -468,7 +468,7 @@ def test_update_component_external_id_no_extids_yet(self): | |
url=self.MYURL + "resource/api/components/bc75c910ca9866886cb4d7b3a301061f", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher({"externalIds": {"package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
responses.matchers.json_params_matcher({"externalIds": {"package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
] | ||
) | ||
|
||
|
@@ -498,7 +498,7 @@ def test_create_new_component(self): | |
} | ||
}, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewComponent", | ||
"componentType": "OSS", | ||
"description": "Illustrative example component", | ||
|
@@ -531,7 +531,7 @@ def test_create_new_component_fail(self): | |
}, | ||
status=409, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewComponent", | ||
"componentType": "OSS", | ||
"description": "Illustrative example component", | ||
|
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) 2020 Siemens | ||
# Copyright (c) 2020-2023 Siemens | ||
# All Rights Reserved. | ||
# Author: [email protected] | ||
# | ||
|
@@ -145,7 +145,7 @@ def test_create_new_license(self): | |
} | ||
} | ||
}, | ||
match=[responses.json_params_matcher({ | ||
match=[responses.matchers.json_params_matcher({ | ||
"shortName": "LGPL-2.0-only", | ||
"fullName": "GNU Library General Public License v2 only", | ||
"checked": True, | ||
|
@@ -180,7 +180,7 @@ def test_create_new_license_fail(self): | |
} | ||
} | ||
}, | ||
match=[responses.json_params_matcher({ | ||
match=[responses.matchers.json_params_matcher({ | ||
"shortName": "LGPL-2.0-only", | ||
"fullName": "GNU Library General Public License v2 only", | ||
"checked": True, | ||
|
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) 2019-2022 Siemens | ||
# Copyright (c) 2019-2023 Siemens | ||
# All Rights Reserved. | ||
# Author: [email protected] | ||
# | ||
|
@@ -515,7 +515,7 @@ def test_create_new_project(self): | |
} | ||
}, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewProduct", "version": "42", | ||
"description": "Example Product", | ||
"projectType": "PRODUCT", "visibility": "EVERYONE", | ||
|
@@ -541,7 +541,7 @@ def test_create_new_project_already_exists(self): | |
}, | ||
status=409, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewProduct", "version": "42", | ||
"description": "Example Product", | ||
"projectType": "PRODUCT", "visibility": "EVERYONE", | ||
|
@@ -600,7 +600,7 @@ def test_update_project_sub_projects_no_add(self): | |
body="4", | ||
status=202, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewComponent", | ||
"version": "9.99", | ||
"projectType": "PRODUCT", | ||
|
@@ -647,7 +647,7 @@ def test_update_project_sub_projects_with_add(self): | |
body="4", | ||
status=202, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"name": "NewComponent", | ||
"version": "9.99", | ||
"projectType": "PRODUCT", | ||
|
@@ -826,7 +826,7 @@ def test_update_project_external_id_add_fresh_id(self): | |
url=self.MYURL + "resource/api/projects/123", | ||
body="4", | ||
match=[ | ||
responses.json_params_matcher({"externalIds": {"already-existing": "must-be-kept", "package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
responses.matchers.json_params_matcher({"externalIds": {"already-existing": "must-be-kept", "package-url": "pkg:deb/debian/debootstrap?type=source"}}) # noqa | ||
] | ||
) | ||
|
||
|
@@ -906,7 +906,7 @@ def test_duplicate_project(self): | |
}, | ||
}, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"version": "42", | ||
'clearingState': 'OPEN', | ||
}) | ||
|
@@ -1018,7 +1018,7 @@ def test_update_project_release_relationship(self): | |
body="4", | ||
status=202, | ||
match=[ | ||
responses.json_params_matcher({ | ||
responses.matchers.json_params_matcher({ | ||
"releaseRelation": "STANDALONE", | ||
"mainlineState": "SPECIFIC", | ||
"comment": "mycomment" | ||
|
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
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