summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authormlavin <markdlavin@gmail.com>2014-04-20 08:58:29 -0400
committerTim Graham <timograham@gmail.com>2014-06-13 12:45:56 -0400
commit4696cd9671243958fd4a596631d75b3cbca325c3 (patch)
treef6b77422bf80728fb278664ebdcb380da8543a80 /tests/admin_scripts
parentcc35bd461d35da2b03c0a1a8ff92123d716db9a9 (diff)
Fixed #22477 -- Removed contrib middleware from the global settings defaults.
Also added a compatibility check for changed middleware defaults. Forwardport of d94de802d3 from stable/1.7.x
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 4f41e876bc..5c28732319 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -58,11 +58,12 @@ class AdminScriptTestCase(unittest.TestCase):
'ROOT_URLCONF',
'SECRET_KEY',
'TEST_RUNNER', # We need to include TEST_RUNNER, otherwise we get a compatibility warning.
+ 'MIDDLEWARE_CLASSES', # We need to include MIDDLEWARE_CLASSES, otherwise we get a compatibility warning.
]
for s in exports:
if hasattr(settings, s):
o = getattr(settings, s)
- if not isinstance(o, dict):
+ if not isinstance(o, (dict, tuple, list)):
o = "'%s'" % o
settings_file.write("%s = %s\n" % (s, o))