summaryrefslogtreecommitdiff
path: root/tests/syndication_tests
diff options
context:
space:
mode:
authorThomas Chaumeny <t.chaumeny@gmail.com>2014-12-09 20:50:45 +0100
committerTim Graham <timograham@gmail.com>2014-12-11 15:56:54 -0500
commit3bb78c5e7a330ed70c518e77899bf8a5ac6bf766 (patch)
tree9fb8a417c5df674b0969c6a304878f9b3215c3b8 /tests/syndication_tests
parent6a141832ab9be30d1bde4794560897bcdbe68fb6 (diff)
downloaddjango-3bb78c5e7a330ed70c518e77899bf8a5ac6bf766.tar.gz
Cleanup cache in contrib.sites to prevent test interference -- refs #11505
Diffstat (limited to 'tests/syndication_tests')
-rw-r--r--tests/syndication_tests/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/syndication_tests/tests.py b/tests/syndication_tests/tests.py
index 8da3d5e8e0..63638fa589 100644
--- a/tests/syndication_tests/tests.py
+++ b/tests/syndication_tests/tests.py
@@ -8,6 +8,7 @@ try:
except ImportError:
pytz = None
+from django.contrib.sites.models import Site
from django.contrib.syndication import views
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings
@@ -55,6 +56,12 @@ class SyndicationFeedTest(FeedTestCase):
"""
Tests for the high-level syndication feed framework.
"""
+ @classmethod
+ def setUpClass(cls):
+ super(SyndicationFeedTest, cls).setUpClass()
+ # This cleanup is necessary because contrib.sites cache
+ # makes tests interfere with each other, see #11505
+ Site.objects.clear_cache()
def test_rss2_feed(self):
"""