#20432 closed Bug (fixed)
GroupAdminTest.test_group_permission_performance fail on full test suite run
| Reported by: | otherjacob | Owned by: | |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Triage Stage: | Unreviewed | |
| Has patch: | no | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | no | UI/UX: | no |
Description
the test passes when running all the admin_views tests in isolation, but fails when running with test suite.
Final pass of running the test against --bisect produces this:
======================================================================
FAIL: test_group_permission_performance (admin_views.tests.GroupAdminTest)
Traceback (most recent call last):
File "/Users/jacob/git/django/tests/admin_views/tests.py", line 3660, in test_group_permission_performance
self.assertEqual(response.status_code, 200)
File "/Users/jacob/git/django/django/test/testcases.py", line 181, in exit
executed, self.num
AssertionError: 7 queries executed, 8 expected
Ran 190 tests in 6.069s
FAILED (failures=1, skipped=2)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...
* Problem found in second half. Bisecting again...
* Source of error: django.contrib.auth
Change History (3)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
| Owner: | set to |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
The missing query is
{'sql': 'QUERY = \'SELECT "django_content_type"."id", "django_content_type"."name", "django_content_type"."app_label", "django_content_type"."model" FROM "django_content_type" WHERE ("django_content_type"."model" = %s AND "django_content_type"."app_label" = %s )\' - PARAMS = (\'group\', \'auth\')', 'time': '0.000'},ContentTypeManager caches get_for_model() queries. Another test caches the Group content type.