Commits

Anonymous committed 3c93803

Fixed #17377 -- Don't depend on a warm cache in admin_views.UserAdminTest.test_user_permission_performance. Thanks Gregor Müllegger.

Comments (0)

Files changed (1)

tests/regressiontests/admin_views/tests.py

     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)