Loading tests/migrations/test_loader.py +3 −5 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ class LoaderTests(TestCase): "Tests loading a squashed migration" migration_loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) # Loading with nothing applied should just give us the one node self.assertEqual( len([x for x in migration_loader.graph.nodes if x[0] == "migrations"]), Loading @@ -219,7 +220,6 @@ class LoaderTests(TestCase): len([x for x in migration_loader.graph.nodes if x[0] == "migrations"]), 2, ) recorder.flush() @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed_complex"}) def test_loading_squashed_complex(self): Loading @@ -227,6 +227,7 @@ class LoaderTests(TestCase): loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) def num_nodes(): plan = set(loader.graph.forwards_plan(('migrations', '7_auto'))) Loading Loading @@ -267,8 +268,6 @@ class LoaderTests(TestCase): loader.build_graph() self.assertEqual(num_nodes(), 0) recorder.flush() @override_settings(MIGRATION_MODULES={ "app1": "migrations.test_migrations_squashed_complex_multi_apps.app1", "app2": "migrations.test_migrations_squashed_complex_multi_apps.app2", Loading Loading @@ -321,6 +320,7 @@ class LoaderTests(TestCase): loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) def num_nodes(): plan = set(loader.graph.forwards_plan(('migrations', '7_auto'))) Loading Loading @@ -365,5 +365,3 @@ class LoaderTests(TestCase): recorder.record_applied("migrations", "7_auto") loader.build_graph() self.assertEqual(num_nodes(), 0) recorder.flush() Loading
tests/migrations/test_loader.py +3 −5 Original line number Diff line number Diff line Loading @@ -207,6 +207,7 @@ class LoaderTests(TestCase): "Tests loading a squashed migration" migration_loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) # Loading with nothing applied should just give us the one node self.assertEqual( len([x for x in migration_loader.graph.nodes if x[0] == "migrations"]), Loading @@ -219,7 +220,6 @@ class LoaderTests(TestCase): len([x for x in migration_loader.graph.nodes if x[0] == "migrations"]), 2, ) recorder.flush() @override_settings(MIGRATION_MODULES={"migrations": "migrations.test_migrations_squashed_complex"}) def test_loading_squashed_complex(self): Loading @@ -227,6 +227,7 @@ class LoaderTests(TestCase): loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) def num_nodes(): plan = set(loader.graph.forwards_plan(('migrations', '7_auto'))) Loading Loading @@ -267,8 +268,6 @@ class LoaderTests(TestCase): loader.build_graph() self.assertEqual(num_nodes(), 0) recorder.flush() @override_settings(MIGRATION_MODULES={ "app1": "migrations.test_migrations_squashed_complex_multi_apps.app1", "app2": "migrations.test_migrations_squashed_complex_multi_apps.app2", Loading Loading @@ -321,6 +320,7 @@ class LoaderTests(TestCase): loader = MigrationLoader(connection) recorder = MigrationRecorder(connection) self.addCleanup(recorder.flush) def num_nodes(): plan = set(loader.graph.forwards_plan(('migrations', '7_auto'))) Loading Loading @@ -365,5 +365,3 @@ class LoaderTests(TestCase): recorder.record_applied("migrations", "7_auto") loader.build_graph() self.assertEqual(num_nodes(), 0) recorder.flush()