summaryrefslogtreecommitdiff
path: root/tests/proxy_models
diff options
context:
space:
mode:
Diffstat (limited to 'tests/proxy_models')
-rw-r--r--tests/proxy_models/tests.py4
1 files changed, 1 insertions, 3 deletions
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