1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Improved test isolation of the admin tests and assigned custom admin sites to

prevent test order dependant failures.

This involves introducing usage of `TestCase.urls` and implementing proper
admin.py modules for some of the test apps.

Thanks Florian Apolloner for finding the issue and contributing the patch.

Refs #15294 (it solves these problems so the fix for that ticket we are going
to commit doesn't introduce obscure and hard to reproduce test failures when
running the Django test suite.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Ramiro Morales
2011-09-20 18:16:49 +00:00
parent fc06ec0daf
commit 7b21bfc074
18 changed files with 904 additions and 630 deletions

View File

@@ -1591,6 +1591,8 @@ TestWithTemplateResponse = override_settings(
class TestEtagWithAdmin(TestCase):
# See https://code.djangoproject.com/ticket/16003
urls = "regressiontests.admin_views.urls"
def test_admin(self):
with self.settings(USE_ETAGS=False):
response = self.client.get('/test_admin/admin/')