diff options
| author | darkryder <sambhav13085@iiitd.ac.in> | 2015-01-21 22:25:57 +0530 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-02-03 14:59:45 -0500 |
| commit | 9ec8aa5e5d42ac4529846f7eae6bf4982800abff (patch) | |
| tree | 6a1195ff3831031f8207e18e4dcf69015fb4c50c /tests/settings_tests | |
| parent | 570912a97d5051fa3aeacd9d16c3be9afcf92198 (diff) | |
Fixed #24149 -- Normalized tuple settings to lists.
Diffstat (limited to 'tests/settings_tests')
| -rw-r--r-- | tests/settings_tests/tests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py index 0befd18e29..8d39d6c1b1 100644 --- a/tests/settings_tests/tests.py +++ b/tests/settings_tests/tests.py @@ -441,12 +441,12 @@ class IsOverriddenTest(TestCase): self.assertTrue(settings.is_overridden('ALLOWED_HOSTS')) -class TestTupleSettings(unittest.TestCase): +class TestListSettings(unittest.TestCase): """ - Make sure settings that should be tuples throw ImproperlyConfigured if they - are set to a string instead of a tuple. + Make sure settings that should be lists or tuples throw + ImproperlyConfigured if they are set to a string instead of a list or tuple. """ - tuple_settings = ( + list_or_tuple_settings = ( "ALLOWED_INCLUDE_ROOTS", "INSTALLED_APPS", "TEMPLATE_DIRS", @@ -456,8 +456,8 @@ class TestTupleSettings(unittest.TestCase): def test_tuple_settings(self): settings_module = ModuleType('fake_settings_module') settings_module.SECRET_KEY = 'foo' - for setting in self.tuple_settings: - setattr(settings_module, setting, ('non_tuple_value')) + for setting in self.list_or_tuple_settings: + setattr(settings_module, setting, ('non_list_or_tuple_value')) sys.modules['fake_settings_module'] = settings_module try: with self.assertRaises(ImproperlyConfigured): |
