diff options
| author | wrwrwr <git@wr.waw.pl> | 2014-11-24 20:10:23 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-11-27 13:02:21 -0500 |
| commit | 7cd3f1c29595d1da7f37d29e7c3bc6a7a314cd1d (patch) | |
| tree | c08d525724e9a1d77f0ae7fb7e266749a1031ac0 | |
| parent | d66bda60590daabe21f60a532a613a31a10fedbd (diff) | |
Fixed cache state dependence for assertNumQueries in test_group_permission_performance.
Refs #20432 and #23746.
| -rw-r--r-- | tests/admin_views/tests.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 0aec7a052f..f55bcacd78 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -4205,6 +4205,10 @@ class GroupAdminTest(TestCase): def test_group_permission_performance(self): g = Group.objects.create(name="test_group") + + # Ensure no queries are skipped due to cached content type for Group. + ContentType.objects.clear_cache() + with self.assertNumQueries(8): response = self.client.get('/test_admin/admin/auth/group/%s/' % g.pk) self.assertEqual(response.status_code, 200) |
