Skip to content

Commit

Permalink
Fixed doc_test_fixtures.json.
Browse files Browse the repository at this point in the history
The broken fixture was hidden by the cache not being reset between
tests. This meant that some tests would fail when run in isolation,
but pass when run as part of the whole suite (because previous tests
would warm up the cache).
  • Loading branch information
bmispelon committed Feb 28, 2024
1 parent 3179425 commit fd9c5d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions aggregator/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def setUp(self, mocker):
def test_community_index_number_of_queries(self):
"""Intended to prevent an n+1 issue on the community index view"""
url = reverse("community-index")
with self.assertNumQueries(4):
with self.assertNumQueries(6):
self.client.get(url)

def test_feed_list_only_approved_and_active(self):
Expand All @@ -106,7 +106,7 @@ def test_feed_list_number_of_queries(self):
url = reverse(
"community-feed-list", kwargs={"feed_type_slug": self.feed_type.slug}
)
with self.assertNumQueries(5):
with self.assertNumQueries(7):
self.client.get(url)

def test_management_command_sends_no_email_with_no_pending_feeds(self):
Expand Down
4 changes: 2 additions & 2 deletions djangoproject/settings/dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

CACHES = {
"default": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
"LOCATION": "trololololol",
},
"docs-pages": {
"BACKEND": "django.core.cache.backends.locmem.LocMemCache",
"BACKEND": "django.core.cache.backends.dummy.DummyCache",
"LOCATION": "docs-pages",
},
}
Expand Down
2 changes: 1 addition & 1 deletion docs/fixtures/doc_test_fixtures.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
{
"fields": {
"lang": "en",
"is_default": true,
"is_default": false,
"release": "1.11"
},
"model": "docs.documentrelease",
Expand Down

0 comments on commit fd9c5d1

Please sign in to comment.