diff --git a/django/contrib/sitemaps/tests/base.py b/django/contrib/sitemaps/tests/base.py index 224277e2a0a..bbe8229aae5 100644 --- a/django/contrib/sitemaps/tests/base.py +++ b/django/contrib/sitemaps/tests/base.py @@ -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', 'test@example.com', 's3krit')