mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #29518 -- Added validation for sqlmigrate's app_label argument.
This commit is contained in:
parent
e7185a6514
commit
6b3e17bab6
3 changed files with 15 additions and 0 deletions
|
@ -1434,6 +1434,14 @@ class AppLabelErrorTests(TestCase):
|
|||
with self.assertRaisesMessage(CommandError, self.did_you_mean_auth_error):
|
||||
call_command('migrate', 'django.contrib.auth')
|
||||
|
||||
def test_sqlmigrate_nonexistent_app_label(self):
|
||||
with self.assertRaisesMessage(CommandError, self.nonexistent_app_error):
|
||||
call_command('sqlmigrate', 'nonexistent_app', '0002')
|
||||
|
||||
def test_sqlmigrate_app_name_specified_as_label(self):
|
||||
with self.assertRaisesMessage(CommandError, self.did_you_mean_auth_error):
|
||||
call_command('sqlmigrate', 'django.contrib.auth', '0002')
|
||||
|
||||
def test_squashmigrations_nonexistent_app_label(self):
|
||||
with self.assertRaisesMessage(CommandError, self.nonexistent_app_error):
|
||||
call_command('squashmigrations', 'nonexistent_app', '0002')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue