summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authoroliver <myungsekyo@gmail.com>2018-06-17 04:18:57 +0900
committerTim Graham <timograham@gmail.com>2018-06-16 15:18:57 -0400
commit78972af367a1da54aa7e539e4b1ffa2b56571e77 (patch)
tree3ccb3a31efa9a4c711414adce508744df00f8663 /tests
parent998d7741951c68b194eb9fab02509024bf60949e (diff)
Fixed #29469 -- Added a helpful makemigrations error if app_label contains dots.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_commands.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py
index 933c00eada..76b8e39b17 100644
--- a/tests/migrations/test_commands.py
+++ b/tests/migrations/test_commands.py
@@ -786,6 +786,12 @@ class MakeMigrationsTests(MigrationTestBase):
call_command("makemigrations", "this_app_does_not_exist", stderr=err)
self.assertIn("'this_app_does_not_exist' could not be found.", err.getvalue())
+ def test_makemigrations_app_name_with_dots(self):
+ err = io.StringIO()
+ with self.assertRaises(SystemExit):
+ call_command('makemigrations', 'invalid.app.label', stderr=err)
+ self.assertIn("'invalid.app.label' is not a valid app label. Did you mean 'label'?", err.getvalue())
+
def test_makemigrations_empty_no_app_specified(self):
"""
makemigrations exits if no app is specified with 'empty' mode.