Author: aaugustin
Date: 2011-12-11 04:04:37 -0800 (Sun, 11 Dec 2011)
New Revision: 17199

Modified:
   django/trunk/tests/regressiontests/admin_views/tests.py
Log:
Fixed #17377 -- Don't depend on a warm cache in 
admin_views.UserAdminTest.test_user_permission_performance. Thanks Gregor 
M?\195?\188llegger.


Modified: django/trunk/tests/regressiontests/admin_views/tests.py
===================================================================
--- django/trunk/tests/regressiontests/admin_views/tests.py     2011-12-11 
10:09:15 UTC (rev 17198)
+++ django/trunk/tests/regressiontests/admin_views/tests.py     2011-12-11 
12:04:37 UTC (rev 17199)
@@ -2982,7 +2982,9 @@
     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)
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to