diff options
| author | Ramiro Morales <cramm0@gmail.com> | 2011-09-20 18:16:49 +0000 |
|---|---|---|
| committer | Ramiro Morales <cramm0@gmail.com> | 2011-09-20 18:16:49 +0000 |
| commit | 7b21bfc0745f92f83a6826a3d3e58797fb74e326 (patch) | |
| tree | acd08401267e495b6569e858268d94cb9f8449d4 /tests/regressiontests/admin_views/customadmin.py | |
| parent | fc06ec0daf563718e3ea96634040878c85bb2ebd (diff) | |
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
Diffstat (limited to 'tests/regressiontests/admin_views/customadmin.py')
| -rw-r--r-- | tests/regressiontests/admin_views/customadmin.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/regressiontests/admin_views/customadmin.py b/tests/regressiontests/admin_views/customadmin.py index 760e93f0f8..a696e9f565 100644 --- a/tests/regressiontests/admin_views/customadmin.py +++ b/tests/regressiontests/admin_views/customadmin.py @@ -5,7 +5,7 @@ from django.conf.urls import patterns from django.contrib import admin from django.http import HttpResponse -import models, forms +import models, forms, admin as base_admin class Admin2(admin.AdminSite): login_form = forms.CustomAdminAuthenticationForm @@ -29,8 +29,8 @@ class Admin2(admin.AdminSite): site = Admin2(name="admin2") -site.register(models.Article, models.ArticleAdmin) -site.register(models.Section, inlines=[models.ArticleInline]) -site.register(models.Thing, models.ThingAdmin) -site.register(models.Fabric, models.FabricAdmin) -site.register(models.ChapterXtra1, models.ChapterXtra1Admin) +site.register(models.Article, base_admin.ArticleAdmin) +site.register(models.Section, inlines=[base_admin.ArticleInline]) +site.register(models.Thing, base_admin.ThingAdmin) +site.register(models.Fabric, base_admin.FabricAdmin) +site.register(models.ChapterXtra1, base_admin.ChapterXtra1Admin) |
