mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Removed some direct settings manipulations in tests; refs #21230.
This commit is contained in:
committed by
Tim Graham
parent
499cd912ca
commit
3565efaa45
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user