Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #17377 -- Don't depend on a warm cache in admin_views.UserAdmin…

…Test.test_user_permission_performance. Thanks Gregor Müllegger.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17199 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 58276bd338a6d3f8361935dd49bc0500382f4c21 1 parent 694bc0f
@aaugustin aaugustin authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 tests/regressiontests/admin_views/tests.py
View
4 tests/regressiontests/admin_views/tests.py
@@ -2982,7 +2982,9 @@ def test_save_add_another_button(self):
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)
Please sign in to comment.
Something went wrong with that request. Please try again.