mirror of https://github.com/django/django.git
Fixed cache state dependence for assertNumQueries in test_group_permission_performance.
Refs #20432 and #23746.
This commit is contained in:
parent
d66bda6059
commit
7cd3f1c295
|
@ -4205,6 +4205,10 @@ class GroupAdminTest(TestCase):
|
|||
|
||||
def test_group_permission_performance(self):
|
||||
g = Group.objects.create(name="test_group")
|
||||
|
||||
# Ensure no queries are skipped due to cached content type for Group.
|
||||
ContentType.objects.clear_cache()
|
||||
|
||||
with self.assertNumQueries(8):
|
||||
response = self.client.get('/test_admin/admin/auth/group/%s/' % g.pk)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
|
Loading…
Reference in New Issue