mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Fixed #29506 -- Added validation for migrate's app_label option.
Thanks MyungSeKyo for the report and the initial patch.
This commit is contained in:
parent
c3c7d15c34
commit
c723a1ff8e
2 changed files with 19 additions and 10 deletions
|
@ -1425,3 +1425,11 @@ class AppLabelErrorTests(TestCase):
|
|||
with self.assertRaises(SystemExit):
|
||||
call_command('makemigrations', 'django.contrib.auth', stderr=err)
|
||||
self.assertIn(self.did_you_mean_auth_error, err.getvalue())
|
||||
|
||||
def test_migrate_nonexistent_app_label(self):
|
||||
with self.assertRaisesMessage(CommandError, self.nonexistent_app_error):
|
||||
call_command('migrate', 'nonexistent_app')
|
||||
|
||||
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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue