diff options
Diffstat (limited to 'tests/admin_scripts')
| -rw-r--r-- | tests/admin_scripts/tests.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index f0ef0fb293..9e6b1f557b 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1682,3 +1682,22 @@ class DiffSettings(AdminScriptTestCase): out, err = self.run_manage(args) self.assertNoOutput(err) self.assertOutput(out, "### STATIC_URL = None") + +class Dumpdata(AdminScriptTestCase): + """Tests for dumpdata management command.""" + + def setUp(self): + self.write_settings('settings.py') + + def tearDown(self): + self.remove_settings('settings.py') + + def test_pks_parsing(self): + """Regression for #20509 + + Test would raise an exception rather than printing an error message. + """ + args = ['dumpdata', '--pks=1'] + out, err = self.run_manage(args) + self.assertOutput(err, "You can only use --pks option with one model") + self.assertNoOutput(out) |
