Fixed #17377 -- Don't depend on a warm cache in admin_views.UserAdminTest.test_user_permission_performance. Thanks Gregor Müllegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
694bc0f22b
commit
58276bd338
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue