mirror of
https://github.com/django/django.git
synced 2025-08-30 23:37:50 +00:00
Refs #29506 -- Added validation for squashmigrations' app_label option.
This commit is contained in:
parent
c723a1ff8e
commit
fc26615164
2 changed files with 14 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue