diff options
| author | Claude Paroz <claude@2xlibre.net> | 2012-10-15 21:08:07 +0200 |
|---|---|---|
| committer | Claude Paroz <claude@2xlibre.net> | 2012-10-15 21:11:32 +0200 |
| commit | 2ee6a46696d4936fbfcb7adc74eb33e50cb9aefe (patch) | |
| tree | e86a46cd9e8f56a1d4f4abde4c1730c198a5e0d9 | |
| parent | 72efdc4d9229231ac44303fba1c504705f1515d6 (diff) | |
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 krzysiumed@gmail.com for
the review.
| -rw-r--r-- | django/contrib/sitemaps/tests/base.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/sitemaps/tests/base.py b/django/contrib/sitemaps/tests/base.py index 224277e2a0..bbe8229aae 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') |
