summaryrefslogtreecommitdiff
path: root/tests/admin_scripts/tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_scripts/tests.py')
-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',