Skip to content

Commit

Permalink
update assert queries in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentporte committed Jul 4, 2023
1 parent 92f26c5 commit b19ddc7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lacommunaute/forum/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_cannot_submit_post(self, *args):
def test_queries(self):
TopicFactory.create_batch(20, with_post=True)
self.client.force_login(self.user)
with self.assertNumQueries(31):
with self.assertNumQueries(21):
self.client.get(self.url)

def test_certified_post_display(self):
Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/forum_conversation/tests/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def test_numqueries(self):
self.client.force_login(self.poster)

# note vincentporte : to be optimized
with self.assertNumQueries(55):
with self.assertNumQueries(44):
response = self.client.get(self.url)
self.assertEqual(response.status_code, 200)

Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/forum_conversation/tests/tests_views_htmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def test_numqueries_vs_tags(self):
assign_perm("can_read_forum", self.user, self.topic.forum)
self.client.force_login(self.user)

with self.assertNumQueries(22):
with self.assertNumQueries(13):
self.client.get(self.url)


Expand Down
2 changes: 1 addition & 1 deletion lacommunaute/forum_member/tests/tests_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def test_queries_number(self):
self.forum.members_group.save()

self.client.force_login(self.profile.user)
with self.assertNumQueries(19):
with self.assertNumQueries(11):
self.client.get(self.url)


Expand Down

0 comments on commit b19ddc7

Please sign in to comment.