@@ -106,14 +106,14 @@ def test_get_all_packages_with_fields_and_all_details(self) -> None:
106106
107107 responses .add (
108108 method = responses .GET ,
109- url = self .MYURL + "resource/api/packages?allDetails=true&fields=packageType " ,
109+ url = self .MYURL + "resource/api/packages?allDetails=true&purl=pkg:pypi/cli-support@2.0.0 " ,
110110 body = '{"_embedded": {"sw360:packages": [{"name": "Tethys.Logging", "version": "1.3.0", "packageType": "FRAMEWORK"}]}}' , # noqa
111111 status = 200 ,
112112 content_type = "application/json" ,
113113 adding_headers = {"Authorization" : "Token " + self .MYTOKEN },
114114 )
115115
116- packages = lib .get_all_packages ("packageType " , True )
116+ packages = lib .get_all_packages (purl = "pkg:pypi/cli-support@2.0.0 " , all_details = True )
117117 self .assertIsNotNone (packages )
118118 self .assertTrue (len (packages ) > 0 )
119119 self .assertEqual ("Tethys.Logging" , packages [0 ]["name" ])
@@ -128,14 +128,14 @@ def test_get_all_packages_with_fields_and_all_details2(self) -> None:
128128
129129 responses .add (
130130 method = responses .GET ,
131- url = self .MYURL + "resource/api/packages?allDetails=true&fields=packageType &page=2&page_entries=6&sort=name%2Cdesc" , # noqa
131+ url = self .MYURL + "resource/api/packages?allDetails=true&name=cli-support&version=2.0.0 &page=2&page_entries=6&sort=name%2Cdesc" , # noqa
132132 body = '{"_embedded": {"sw360:packages": [{"name": "Tethys.Logging", "version": "1.3.0", "packageType": "FRAMEWORK"}]}}' , # noqa
133133 status = 200 ,
134134 content_type = "application/json" ,
135135 adding_headers = {"Authorization" : "Token " + self .MYTOKEN },
136136 )
137137
138- packages = lib .get_all_packages ("packageType " , True , page = 2 , page_size = 6 , sort = "name,desc" )
138+ packages = lib .get_all_packages (name = "cli-support " , version = "2.0.0" , all_details = True , page = 2 , page_size = 6 , sort = "name,desc" ) # noqa
139139 self .assertIsNotNone (packages )
140140 self .assertTrue (len (packages ) > 0 )
141141 pkgs = packages ["_embedded" ]["sw360:packages" ]
0 commit comments