summaryrefslogtreecommitdiff
path: root/tests/admin_scripts
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2014-02-18 10:19:04 +0100
committerClaude Paroz <claude@2xlibre.net>2014-02-18 10:23:30 +0100
commit45edb9d2359c60952fd791616df887eb95f75746 (patch)
tree4742734d9a93d09484660a7523067b6666ef3285 /tests/admin_scripts
parentfaf6a911ad7357c8dd1defa3be0317a8418febf7 (diff)
Fixed #22057 -- Ensured reverse_lazy can be used in settings
And without causing a circular import. Thanks Akis Kesoglou for the report.
Diffstat (limited to 'tests/admin_scripts')
-rw-r--r--tests/admin_scripts/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py
index 19be4a3372..af6aa92754 100644
--- a/tests/admin_scripts/tests.py
+++ b/tests/admin_scripts/tests.py
@@ -40,7 +40,7 @@ custom_templates_dir = os.path.join(os.path.dirname(__file__), 'custom_templates
class AdminScriptTestCase(unittest.TestCase):
- def write_settings(self, filename, apps=None, is_dir=False, sdict=None):
+ def write_settings(self, filename, apps=None, is_dir=False, sdict=None, extra=None):
if is_dir:
settings_dir = os.path.join(test_dir, filename)
os.mkdir(settings_dir)
@@ -51,6 +51,8 @@ class AdminScriptTestCase(unittest.TestCase):
with open(settings_file_path, 'w') as settings_file:
settings_file.write('# -*- coding: utf-8 -*\n')
settings_file.write('# Settings file automatically generated by admin_scripts test case\n')
+ if extra:
+ settings_file.write("%s\n" % extra)
exports = [
'DATABASES',
'ROOT_URLCONF',