diff options
| author | Tim Graham <timograham@gmail.com> | 2018-05-26 20:58:41 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-05-26 21:06:58 -0400 |
| commit | 5cc81cd9eb69f5f7a711412c02039b435c393135 (patch) | |
| tree | f4416867c5d1510df3117c9ebf22a6a8c64edbf5 /tests/settings_tests | |
| parent | b4fd9b5ad481c446636befa40cce5a2b5e9799fc (diff) | |
Reverted "Fixed #29324 -- Made Settings raise ImproperlyConfigured if SECRET_KEY is accessed and not set."
This reverts commit b3cffde5559c4fa97625512d7ec41a674be26076 due to
a regression and performance concerns.
Diffstat (limited to 'tests/settings_tests')
| -rw-r--r-- | tests/settings_tests/tests.py | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index 53a9ea98f6..383345494d 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -291,20 +291,8 @@ class SettingsTests(SimpleTestCase): def test_no_secret_key(self): settings_module = ModuleType('fake_settings_module') sys.modules['fake_settings_module'] = settings_module - msg = 'The SECRET_KEY setting must be set.' + msg = 'The SECRET_KEY setting must not be empty.' try: - settings = Settings('fake_settings_module') - with self.assertRaisesMessage(ImproperlyConfigured, msg): - settings.SECRET_KEY - finally: - del sys.modules['fake_settings_module'] - - def test_secret_key_empty_string(self): - settings_module = ModuleType('fake_settings_module') - settings_module.SECRET_KEY = '' - sys.modules['fake_settings_module'] = settings_module - try: - msg = 'The SECRET_KEY setting must not be empty.' with self.assertRaisesMessage(ImproperlyConfigured, msg): Settings('fake_settings_module') finally: |
