From 3565efaa451db6eb735a085ea6aae3fe86e6d283 Mon Sep 17 00:00:00 2001 From: Bouke Haarsma Date: Mon, 14 Oct 2013 15:14:17 +0200 Subject: Removed some direct settings manipulations in tests; refs #21230. --- tests/proxy_models/tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/proxy_models') diff --git a/tests/proxy_models/tests.py b/tests/proxy_models/tests.py index 2ee695929c..22ba47b84f 100644 --- a/tests/proxy_models/tests.py +++ b/tests/proxy_models/tests.py @@ -150,6 +150,7 @@ class ProxyModelTests(TestCase): proxy = True self.assertRaises(FieldError, build_new_fields) + @override_settings(TEST_SWAPPABLE_MODEL='proxy_models.AlternateModel') def test_swappable(self): try: # This test adds dummy applications to the app cache. These @@ -158,8 +159,6 @@ class ProxyModelTests(TestCase): old_app_models = copy.deepcopy(cache.app_models) old_app_store = copy.deepcopy(cache.app_store) - settings.TEST_SWAPPABLE_MODEL = 'proxy_models.AlternateModel' - class SwappableModel(models.Model): class Meta: @@ -175,7 +174,6 @@ class ProxyModelTests(TestCase): class Meta: proxy = True finally: - del settings.TEST_SWAPPABLE_MODEL cache.app_models = old_app_models cache.app_store = old_app_store -- cgit v1.3