From 58276bd338a6d3f8361935dd49bc0500382f4c21 Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Sun, 11 Dec 2011 12:04:37 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20#17377=20--=20Don't=20depend=20on=20a?= =?UTF-8?q?=20warm=20cache=20in=20admin=5Fviews.UserAdminTest.test=5Fuser?= =?UTF-8?q?=5Fpermission=5Fperformance.=20Thanks=20Gregor=20M=C3=BCllegger?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://code.djangoproject.com/svn/django/trunk@17199 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/admin_views/tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/admin_views/tests.py b/tests/regressiontests/admin_views/tests.py index f176708366..756597c70f 100644 --- a/tests/regressiontests/admin_views/tests.py +++ b/tests/regressiontests/admin_views/tests.py @@ -2982,7 +2982,9 @@ class UserAdminTest(TestCase): def test_user_permission_performance(self): u = User.objects.all()[0] - with self.assertNumQueries(7): + # Don't depend on a warm cache, see #17377. + ContentType.objects.clear_cache() + with self.assertNumQueries(8): response = self.client.get('/test_admin/admin/auth/user/%s/' % u.pk) self.assertEqual(response.status_code, 200)