Fixed #20290 -- Allow override_settings to be nested

Refactored override_settings to store the underlying settings._wrapped
value seen at runtime, not instantiation time.
This commit is contained in:
Oliver Beattie 2013-04-19 10:44:47 +01:00 committed by Claude Paroz
parent 7314007c5b
commit 552a90b444
4 changed files with 34 additions and 2 deletions

View file

@ -95,6 +95,11 @@ class LiveServerAddress(LiveServerBase):
else:
del os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS']
@classmethod
def tearDownClass(cls):
# skip it, as setUpClass doesn't call its parent either
pass
@classmethod
def raises_exception(cls, address, exception):
os.environ['DJANGO_LIVE_TEST_SERVER_ADDRESS'] = address