diff options
| author | Claude Paroz <claude@2xlibre.net> | 2018-06-20 09:28:04 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-06-20 15:46:43 -0400 |
| commit | fc266151648da8856dc735058375ed6cc0e636b5 (patch) | |
| tree | aae6889a141cfa6f4d99f5e3faa82257e4e2f850 /tests | |
| parent | c723a1ff8e76aaef227d5af7a57006cc9bfd2fc8 (diff) | |
Refs #29506 -- Added validation for squashmigrations' app_label option.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/migrations/test_commands.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 494d5cd211..4f01a3b665 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -1433,3 +1433,11 @@ class AppLabelErrorTests(TestCase): def test_migrate_app_name_specified_as_label(self): with self.assertRaisesMessage(CommandError, self.did_you_mean_auth_error): call_command('migrate', 'django.contrib.auth') + + def test_squashmigrations_nonexistent_app_label(self): + with self.assertRaisesMessage(CommandError, self.nonexistent_app_error): + call_command('squashmigrations', 'nonexistent_app', '0002') + + def test_squashmigrations_app_name_specified_as_label(self): + with self.assertRaisesMessage(CommandError, self.did_you_mean_auth_error): + call_command('squashmigrations', 'django.contrib.auth', '0002') |
