From 03bee42a7e28b1bbd6bb8df03b9e9bdd54f44837 Mon Sep 17 00:00:00 2001 From: oliver Date: Sat, 30 Mar 2019 23:14:07 +0900 Subject: Made startapp/project's overlaying error message use 'app' or 'project'. --- tests/admin_scripts/tests.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'tests/admin_scripts') diff --git a/tests/admin_scripts/tests.py b/tests/admin_scripts/tests.py index 32233cf258..f6fb42b1aa 100644 --- a/tests/admin_scripts/tests.py +++ b/tests/admin_scripts/tests.py @@ -1938,7 +1938,11 @@ class StartProject(LiveServerTestCase, AdminScriptTestCase): # running again.. out, err = self.run_django_admin(args) self.assertNoOutput(out) - self.assertOutput(err, "already exists") + self.assertOutput( + err, + "already exists. Overlaying a project into an existing directory " + "won't replace conflicting files." + ) def test_custom_project_template(self): "Make sure the startproject management command is able to use a different project template" @@ -2128,6 +2132,15 @@ class StartApp(AdminScriptTestCase): ) self.assertFalse(os.path.exists(testproject_dir)) + def test_overlaying_app(self): + self.run_django_admin(['startapp', 'app1']) + out, err = self.run_django_admin(['startapp', 'app2', 'app1']) + self.assertOutput( + err, + "already exists. Overlaying an app into an existing directory " + "won't replace conflicting files." + ) + class DiffSettings(AdminScriptTestCase): """Tests for diffsettings management command.""" -- cgit v1.3