diff options
author | Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com> | 2015-05-14 14:14:34 +0200 |
---|---|---|
committer | Tim Graham <timograham@gmail.com> | 2015-05-14 09:57:13 -0400 |
commit | adf5d75af1418b044d7ea335896e75277da06b77 (patch) | |
tree | 1ea6c9e8ae76834216266564b2fc6fba27cdaf11 /tests/admin_registration | |
parent | 4157c502a5202798d0f73645181cb82aa71d34d9 (diff) | |
download | django-adf5d75af1418b044d7ea335896e75277da06b77.tar.gz |
Refs #24553 -- Isolated admin_* tests.
This fixes a regression with runtests.py --reverse after
bd53db5eab05099ae371348529c6428e0da95c6a
We need to avoid leaking model registration in the default AdminSite.
Diffstat (limited to 'tests/admin_registration')
-rw-r--r-- | tests/admin_registration/tests.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/admin_registration/tests.py b/tests/admin_registration/tests.py index 355aa3960c..6cda66bb0e 100644 --- a/tests/admin_registration/tests.py +++ b/tests/admin_registration/tests.py @@ -104,6 +104,7 @@ class TestRegistrationDecorator(TestCase): isinstance(self.default_site._registry[Person], admin.options.ModelAdmin) ) + self.default_site.unregister(Person) def test_custom_site_registration(self): register(Person, site=self.custom_site)(NameAdmin) @@ -118,10 +119,12 @@ class TestRegistrationDecorator(TestCase): isinstance(self.default_site._registry[Traveler], admin.options.ModelAdmin) ) + self.default_site.unregister(Traveler) self.assertTrue( isinstance(self.default_site._registry[Place], admin.options.ModelAdmin) ) + self.default_site.unregister(Place) def test_wrapped_class_not_a_model_admin(self): self.assertRaisesMessage(ValueError, 'Wrapped class must subclass ModelAdmin.', |