summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-12-19 13:01:51 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-12-19 13:01:51 +0000
commit059d9205d40243117730aba4baea1373834e57d2 (patch)
tree5f02ce1b04409e8aded71dbc5a129ea0957992cb
parentfbc2f0a0a6ce9218cc0b7feba1a9d6c7205de19f (diff)
Fixed #14920 -- Fixed some test failures caused by caching contenttypes that were loaded during a contenttype fixture test. Thanks to Karen for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/contrib/auth/tests/permissions.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/permissions.py b/django/contrib/auth/tests/permissions.py
index 1f84231c62..3bff0f9fb2 100644
--- a/django/contrib/auth/tests/permissions.py
+++ b/django/contrib/auth/tests/permissions.py
@@ -11,6 +11,12 @@ from django.test import TestCase
class TestAuthPermissions(TestCase):
+ def tearDown(self):
+ # These tests mess with content types, but content type lookups
+ # are cached, so we need to make sure the effects of this test
+ # are cleaned up.
+ contenttypes_models.ContentType.objects.clear_cache()
+
def test_permission_register_order(self):
"""Test that the order of registered permissions doesn't break"""
# Changeset 14413 introduced a regression in the ordering of