mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Tested showmigrations with apps without migrations.
This commit is contained in:
parent
05c578bc1f
commit
4fc8fb7dda
@ -373,6 +373,17 @@ class MigrateTests(MigrationTestBase):
|
||||
call_command('migrate', 'migrations', '0003', fake=True, verbosity=0)
|
||||
call_command('migrate', 'migrations', 'zero', verbosity=0)
|
||||
|
||||
@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_empty'})
|
||||
def test_showmigrations_no_migrations(self):
|
||||
out = io.StringIO()
|
||||
call_command('showmigrations', stdout=out, no_color=True)
|
||||
self.assertEqual('migrations\n (no migrations)\n', out.getvalue().lower())
|
||||
|
||||
@override_settings(INSTALLED_APPS=['migrations.migrations_test_apps.unmigrated_app'])
|
||||
def test_showmigrations_unmigrated_app(self):
|
||||
with self.assertRaisesMessage(CommandError, 'No migrations present for: unmigrated_app'):
|
||||
call_command('showmigrations', 'unmigrated_app')
|
||||
|
||||
@override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_empty"})
|
||||
def test_showmigrations_plan_no_migrations(self):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user