kopia lustrzana https://github.com/wagtail/wagtail
Fix cache warmup in redirects export queries test to ensure consistency when run in parallel/not
rodzic
fe653566cb
commit
f96c0a5e0a
|
@ -766,8 +766,9 @@ class TestRedirectsIndexView(AdminTemplateTestUtils, WagtailTestUtils, TestCase)
|
|||
models.Redirect.add_redirect(f"/to-page{i}", page, False)
|
||||
|
||||
response = self.get(params={"export": "csv"})
|
||||
# Session, User, UserProfile, Redirects, Site
|
||||
with self.assertNumQueries(5):
|
||||
csv_data = response.getvalue().decode().strip().split("\n")
|
||||
# Session, User, UserProfile, Redirects
|
||||
with self.assertNumQueries(4):
|
||||
response = self.get(params={"export": "csv"})
|
||||
csv_data = response.getvalue().decode().strip().split("\n")
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue