mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29091 -- Fixed makemigrations crash if migrations directory doesn't have __init__.py.
Regression in aadd3aeb2b.
This commit is contained in:
@@ -853,6 +853,13 @@ class MakeMigrationsTests(MigrationTestBase):
|
||||
call_command("makemigrations", stdout=out)
|
||||
self.assertIn("0001_initial.py", out.getvalue())
|
||||
|
||||
def test_makemigrations_no_init(self):
|
||||
"""Migration directories without an __init__.py file are allowed."""
|
||||
out = io.StringIO()
|
||||
with self.temporary_migration_module(module='migrations.test_migrations_no_init'):
|
||||
call_command('makemigrations', stdout=out)
|
||||
self.assertIn('0001_initial.py', out.getvalue())
|
||||
|
||||
def test_makemigrations_migrations_announce(self):
|
||||
"""
|
||||
makemigrations announces the migration at the default verbosity level.
|
||||
|
||||
Reference in New Issue
Block a user