1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #25308 -- Made MigrationQuestioner respect MIGRATION_MODULES setting.

This commit is contained in:
Jeremy Satterfield
2015-08-20 12:45:30 -05:00
committed by Tim Graham
parent 91ec1841f5
commit 1175027641
2 changed files with 12 additions and 2 deletions

View File

@@ -610,6 +610,16 @@ class MakeMigrationsTests(MigrationTestBase):
call_command("makemigrations", "migrations", stdout=out)
self.assertIn("No changes detected in app 'migrations'", out.getvalue())
def test_makemigrations_no_apps_initial(self):
"""
makemigrations should detect initial is needed on empty migration
modules if no app provided.
"""
out = six.StringIO()
with self.temporary_migration_module(module="migrations.test_migrations_empty"):
call_command("makemigrations", stdout=out)
self.assertIn("0001_initial.py", out.getvalue())
def test_makemigrations_migrations_announce(self):
"""
Makes sure that makemigrations announces the migration at the default verbosity level.