mirror of
https://github.com/django/django.git
synced 2025-08-04 02:48:35 +00:00
Fixed #29091 -- Fixed makemigrations crash if migrations directory doesn't have __init__.py.
Regression in aadd3aeb2b
.
This commit is contained in:
parent
de59132afc
commit
0a37ea56d0
4 changed files with 11 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue