@@ -462,14 +462,14 @@ def test_api_packages_single_with_purl_in_query_num_queries(self):
462462 self .csrf_client .get (f"/api/packages/?purl={ self .pkg_2_14_0_rc1 .purl } " , format = "json" )
463463
464464 def test_api_packages_single_with_purl_no_version_in_query_num_queries (self ):
465- with self .assertNumQueries (68 ):
465+ with self .assertNumQueries (64 ):
466466 self .csrf_client .get (
467467 f"/api/packages/?purl=pkg:maven/com.fasterxml.jackson.core/jackson-databind" ,
468468 format = "json" ,
469469 )
470470
471471 def test_api_packages_bulk_search (self ):
472- with self .assertNumQueries (49 ):
472+ with self .assertNumQueries (45 ):
473473 packages = [self .pkg_2_12_6 , self .pkg_2_12_6_1 , self .pkg_2_13_1 ]
474474 purls = [p .purl for p in packages ]
475475
@@ -482,7 +482,7 @@ def test_api_packages_bulk_search(self):
482482 ).json ()
483483
484484 def test_api_packages_with_lookup (self ):
485- with self .assertNumQueries (16 ):
485+ with self .assertNumQueries (14 ):
486486 data = {"purl" : self .pkg_2_12_6 .purl }
487487
488488 resp = self .csrf_client .post (
@@ -492,7 +492,7 @@ def test_api_packages_with_lookup(self):
492492 ).json ()
493493
494494 def test_api_packages_bulk_lookup (self ):
495- with self .assertNumQueries (49 ):
495+ with self .assertNumQueries (45 ):
496496 packages = [self .pkg_2_12_6 , self .pkg_2_12_6_1 , self .pkg_2_13_1 ]
497497 purls = [p .purl for p in packages ]
498498
@@ -556,19 +556,6 @@ def setUp(self):
556556 set_as_affected_by (package = self .pkg_2_13_2 , vulnerability = self .vul2 )
557557 set_as_fixing (package = self .pkg_2_13_2 , vulnerability = self .vul1 )
558558
559- def test_api_with_package_with_no_vulnerabilities (self ):
560- affected_vulnerabilities = []
561- vuln = {
562- "foo" : "bar" ,
563- }
564-
565- package_with_no_vulnerabilities = MinimalPackageSerializer .get_vulnerability (
566- self ,
567- vuln ,
568- )
569-
570- assert package_with_no_vulnerabilities is None
571-
572559 def test_api_with_lesser_and_greater_fixed_by_packages (self ):
573560 response = self .csrf_client .get (f"/api/packages/{ self .pkg_2_13_1 .id } " , format = "json" ).data
574561
0 commit comments