Skip to content
Browse files

Fixed #15753 -- Cleared cache between sitemaps tests

When caching was activated, test_simple_sitemap would fail
because the test result was fetched from cache.
Thanks lucho for the initial patch and for
the review.
  • Loading branch information...
1 parent 72efdc4 commit 2ee6a46696d4936fbfcb7adc74eb33e50cb9aefe @claudep claudep committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 django/contrib/sitemaps/tests/
2 django/contrib/sitemaps/tests/
@@ -1,5 +1,6 @@
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
+from django.core.cache import cache
from django.test import TestCase
@@ -11,6 +12,7 @@ class SitemapTestsBase(TestCase):
def setUp(self):
self.base_url = '%s://%s' % (self.protocol, self.domain)
self.old_Site_meta_installed = Site._meta.installed
+ cache.clear()
# Create a user that will double as sitemap content
User.objects.create_user('testuser', '', 's3krit')

0 comments on commit 2ee6a46

Please sign in to comment.
Something went wrong with that request. Please try again.