Skip to content

Commit

Permalink
updated expected query numbers for various PNI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mmmavis committed Sep 3, 2024
1 parent ad79139 commit ac2ac18
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def test_serve_page_no_products(self):
products = ProductPage.objects.descendant_of(self.bg)
products.delete()
self.assertEqual(products.count(), 0)
query_number = 52
query_number = 45

with self.assertNumQueries(query_number):
response = self.client.get(self.bg.url)
Expand All @@ -179,7 +179,7 @@ def test_serve_page_no_products(self):
def test_serve_page_one_product(self):
products = ProductPage.objects.descendant_of(self.bg)
self.assertEqual(products.count(), 1)
query_number = 67
query_number = 60

with self.assertNumQueries(query_number):
response = self.client.get(self.bg.url)
Expand All @@ -193,7 +193,7 @@ def test_serve_page_many_products(self):
buyersguide_factories.ProductPageFactory(parent=self.bg, with_random_categories=True)
products = ProductPage.objects.descendant_of(self.bg)
self.assertEqual(products.count(), additional_products_count + 1)
query_number = 68
query_number = 61

with self.assertNumQueries(query_number):
response = self.client.get(self.bg.url)
Expand All @@ -207,7 +207,7 @@ def test_serve_page_many_products_logged_in(self):
buyersguide_factories.ProductPageFactory(parent=self.bg, with_random_categories=True)
products = ProductPage.objects.descendant_of(self.bg)
self.assertEqual(products.count(), additional_products_count + 1)
query_number = 74
query_number = 67
self.client.force_login(user=self.create_test_user())

with self.assertNumQueries(query_number):
Expand Down

0 comments on commit ac2ac18

Please sign in to comment.