diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-13 16:22:03 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2011-01-13 16:22:03 +0000 |
| commit | 8781ea6cd71de32fc9cc30c3427c682b9448fd50 (patch) | |
| tree | 603e3d02124e2b0186004e6fcb8508f4a8cdbc3d | |
| parent | 2d352444b0354f163ac7d04fcddf84cc744a09d8 (diff) | |
Fixed #14975, #14925 -- Added some cache flushing to avoid some cross-test effects. Thanks to jsdalton and rpbarlow for the reports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15192 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/contrib/auth/tests/auth_backends.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/auth_backends.py b/django/contrib/auth/tests/auth_backends.py index 6a99757921..256357a95e 100644 --- a/django/contrib/auth/tests/auth_backends.py +++ b/django/contrib/auth/tests/auth_backends.py @@ -19,6 +19,10 @@ class BackendTest(TestCase): def tearDown(self): settings.AUTHENTICATION_BACKENDS = self.curr_auth + # The custom_perms test messes with ContentTypes, which will + # be cached; flush the cache to ensure there are no side effects + # Refs #14975, #14925 + ContentType.objects.clear_cache() def test_has_perm(self): user = User.objects.get(username='test') @@ -174,6 +178,10 @@ class RowlevelBackendTest(TestCase): def tearDown(self): settings.AUTHENTICATION_BACKENDS = self.curr_auth self.restore_warnings_state() + # The get_group_permissions test messes with ContentTypes, which will + # be cached; flush the cache to ensure there are no side effects + # Refs #14975, #14925 + ContentType.objects.clear_cache() def test_has_perm(self): self.assertEqual(self.user1.has_perm('perm', TestObj()), False) |
