summaryrefslogtreecommitdiff
path: root/tests/proxy_models
diff options
context:
space:
mode:
authorBouke Haarsma <bouke@webatoom.nl>2013-10-14 15:14:17 +0200
committerTim Graham <timograham@gmail.com>2013-10-21 11:31:05 -0400
commit3565efaa451db6eb735a085ea6aae3fe86e6d283 (patch)
tree7030dcebfb01ef75bd1d6b308fd21caea3f20034 /tests/proxy_models
parent499cd912ca36597df737df73c8f91ffab36c83d9 (diff)
Removed some direct settings manipulations in tests; refs #21230.
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