summaryrefslogtreecommitdiff
path: root/tests/regressiontests/admin_scripts/tests.py
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2012-10-22 18:13:59 -0600
committerCarl Meyer <carl@oddbird.net>2012-10-22 18:49:08 -0600
commit3541a10d492db6d1f509f3a50a024568c16c5229 (patch)
tree6ced9b1f0533833be29b34cb1c0bd1efab2eeb86 /tests/regressiontests/admin_scripts/tests.py
parentea57112d531dfc6d2be50f47ee89f3a06f8ff1a8 (diff)
Fixed #19164 -- Fixed diffsettings command broken in fix for #18545.
Thanks Mario César for the report and draft patch.
Diffstat (limited to 'tests/regressiontests/admin_scripts/tests.py')
-rw-r--r--tests/regressiontests/admin_scripts/tests.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/regressiontests/admin_scripts/tests.py b/tests/regressiontests/admin_scripts/tests.py
index 6f524bea29..a5deba7fe1 100644
--- a/tests/regressiontests/admin_scripts/tests.py
+++ b/tests/regressiontests/admin_scripts/tests.py
@@ -1603,3 +1603,15 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase):
with codecs.open(path, 'r', 'utf-8') as f:
self.assertEqual(f.read(),
'Some non-ASCII text for testing ticket #18091:\nüäö €\n')
+
+
+class DiffSettings(AdminScriptTestCase):
+ """Tests for diffsettings management command."""
+ def test_basic(self):
+ "Runs without error and emits settings diff."
+ self.write_settings('settings_to_diff.py', sdict={'FOO': '"bar"'})
+ args = ['diffsettings', '--settings=settings_to_diff']
+ out, err = self.run_manage(args)
+ self.remove_settings('settings_to_diff.py')
+ self.assertNoOutput(err)
+ self.assertOutput(out, "FOO = 'bar' ###")