mirror of
https://github.com/django/django.git
synced 2025-11-25 05:04:26 +00:00
Reverted "Fixed #30300 -- Allowed migrations to be loaded from directories without __init__.py file."
This reverts commit 3cd3bebe89.
This commit is contained in:
parent
3f2821af6b
commit
ff55adbd0d
3 changed files with 11 additions and 16 deletions
|
|
@ -506,12 +506,11 @@ class LoaderTests(TestCase):
|
|||
MIGRATION_MODULES={'migrations': 'migrations.test_migrations_namespace_package'},
|
||||
)
|
||||
def test_loading_namespace_package(self):
|
||||
"""Migration directories without an __init__.py file are loaded."""
|
||||
migration_loader = MigrationLoader(connection)
|
||||
self.assertEqual(
|
||||
migration_loader.graph.forwards_plan(('migrations', '0001_initial')),
|
||||
[('migrations', '0001_initial')],
|
||||
)
|
||||
"""Migration directories without an __init__.py file are ignored."""
|
||||
loader = MigrationLoader(connection)
|
||||
loader.load_disk()
|
||||
migrations = [name for app, name in loader.disk_migrations if app == 'migrations']
|
||||
self.assertEqual(migrations, [])
|
||||
|
||||
|
||||
class PycLoaderTests(MigrationTestBase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue