mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Cleanup cache in contrib.sites to prevent test interference -- refs #11505
This commit is contained in:
committed by
Tim Graham
parent
6a141832ab
commit
3bb78c5e7a
@@ -15,6 +15,14 @@ class Advertisement(models.Model):
|
||||
|
||||
|
||||
class ModelPackageTests(TestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
super(ModelPackageTests, cls).setUpClass()
|
||||
# This cleanup is necessary because contrib.sites cache
|
||||
# makes tests interfere with each other, see #11505
|
||||
Site.objects.clear_cache()
|
||||
|
||||
def test_m2m_tables_in_subpackage_models(self):
|
||||
"""
|
||||
Regression for #12168: models split into subpackages still get M2M
|
||||
|
||||
Reference in New Issue
Block a user