summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2020-07-22 01:04:06 -0400
committerGitHub <noreply@github.com>2020-07-22 07:04:06 +0200
commitff55adbd0da6618abaf265d16196bf54f81aa77a (patch)
treea4b16306b57c8b49bd62cbf9c03922d9a80b8b70 /tests
parent3f2821af6bc48fa8e7970c1ce27bc54c3172545e (diff)
Reverted "Fixed #30300 -- Allowed migrations to be loaded from directories without __init__.py file."
This reverts commit 3cd3bebe8921e14b911b36b2a1cbceef8fb6294e.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_loader.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py
index ce2f209188..27a052ddac 100644
--- a/tests/migrations/test_loader.py
+++ b/tests/migrations/test_loader.py
@@ -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):