Kaydet (Commit) bc2eb6bf authored tarafından Marten Kenbeek's avatar Marten Kenbeek Kaydeden (comit) Tim Graham

[1.8.x] Fixed #24345 -- Isolated sitemaps_tests from contenttypes_tests; refs #11505

Backport of f668bac9 from master
üst ba9f6027
from django.apps import apps from django.apps import apps
from django.contrib.sites.models import Site
from django.core.cache import cache from django.core.cache import cache
from django.test import TestCase, modify_settings, override_settings from django.test import TestCase, modify_settings, override_settings
...@@ -18,3 +19,10 @@ class SitemapTestsBase(TestCase): ...@@ -18,3 +19,10 @@ class SitemapTestsBase(TestCase):
# Create an object for sitemap content. # Create an object for sitemap content.
TestModel.objects.create(name='Test Object') TestModel.objects.create(name='Test Object')
self.i18n_model = I18nTestModel.objects.create(name='Test Object') self.i18n_model = I18nTestModel.objects.create(name='Test Object')
@classmethod
def setUpClass(cls):
super(SitemapTestsBase, cls).setUpClass()
# This cleanup is necessary because contrib.sites cache
# makes tests interfere with each other, see #11505
Site.objects.clear_cache()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment