@@ -454,22 +454,22 @@ def test_api_packages_all_num_queries(self):
454454 ]
455455
456456 def test_api_packages_single_num_queries (self ):
457- with self .assertNumQueries (10 ):
457+ with self .assertNumQueries (8 ):
458458 self .csrf_client .get (f"/api/packages/{ self .pkg_2_14_0_rc1 .id } " , format = "json" )
459459
460460 def test_api_packages_single_with_purl_in_query_num_queries (self ):
461- with self .assertNumQueries (11 ):
461+ with self .assertNumQueries (9 ):
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 (88 ):
465+ with self .assertNumQueries (68 ):
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 (63 ):
472+ with self .assertNumQueries (49 ):
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 (18 ):
485+ with self .assertNumQueries (16 ):
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 (63 ):
495+ with self .assertNumQueries (49 ):
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
0 commit comments