1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fix my slightly hasty autodetector changes

This commit is contained in:
Andrew Godwin
2014-02-12 17:22:50 +00:00
parent 80bbe2265d
commit bad9456b9c
2 changed files with 7 additions and 6 deletions

View File

@@ -54,7 +54,7 @@ class AutodetectorTests(TestCase):
autodetector = MigrationAutodetector(before, after)
changes = autodetector._detect_changes()
# Run through arrange_for_graph
changes = autodetector._arrange_for_graph(changes, graph)
changes = autodetector.arrange_for_graph(changes, graph)
# Make sure there's a new name, deps match, etc.
self.assertEqual(changes["testapp"][0].name, "0003_author")
self.assertEqual(changes["testapp"][0].dependencies, [("testapp", "0002_foobar")])
@@ -70,7 +70,7 @@ class AutodetectorTests(TestCase):
changes = autodetector._detect_changes()
# Run through arrange_for_graph
graph = MigrationGraph()
changes = autodetector._arrange_for_graph(changes, graph)
changes = autodetector.arrange_for_graph(changes, graph)
changes["testapp"][0].dependencies.append(("otherapp", "0001_initial"))
changes = autodetector._trim_to_apps(changes, set(["testapp"]))
# Make sure there's the right set of migrations