Made startapp/project's overlaying error message use 'app' or 'project'.

This commit is contained in:
oliver 2019-03-30 23:14:07 +09:00 committed by Tim Graham
parent 96446c7152
commit 03bee42a7e
2 changed files with 28 additions and 13 deletions

View file

@ -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."""