Skip to content

Commit 254f990

Browse files
committed
REST: Fix bug 335 tests
One extra query is necessary for patch/cover endpoints to fetch labels information.
1 parent 62fc5e3 commit 254f990

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎patchwork/tests/unit/api/test_cover.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def test_list_bug_335(self):
153153
series = create_series()
154154
create_covers(5, series=series)
155155

156-
with self.assertNumQueries(3):
156+
with self.assertNumQueries(4):
157157
self.client.get(self.api_url())
158158

159159
@utils.store_samples('cover-detail')

‎patchwork/tests/unit/api/test_patch.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ def test_list_bug_335(self):
280280
create_patches(5, series=series)
281281

282282
# Count, page IDs, patch rows and the constant-size prefetches.
283-
with self.assertNumQueries(6):
283+
with self.assertNumQueries(7):
284284
self.client.get(self.api_url())
285285

286286
@utils.store_samples('patch-detail')

0 commit comments

Comments
 (0)