Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix graph tests

  • Loading branch information...
commit 7f9a0b7061e78a43b97abd6a3716d1e2017d72e3 1 parent dfa7c5c
@andrewgodwin andrewgodwin authored
Showing with 19 additions and 0 deletions.
  1. +19 −0 tests/migrations/test_graph.py
View
19 tests/migrations/test_graph.py
@@ -17,6 +17,12 @@ def test_simple_graph(self):
"""
# Build graph
graph = MigrationGraph()
+ graph.add_node(("app_a", "0001"), None)
+ graph.add_node(("app_a", "0002"), None)
+ graph.add_node(("app_a", "0003"), None)
+ graph.add_node(("app_a", "0004"), None)
+ graph.add_node(("app_b", "0001"), None)
+ graph.add_node(("app_b", "0002"), None)
graph.add_dependency(("app_a", "0004"), ("app_a", "0003"))
graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
@@ -64,6 +70,14 @@ def test_complex_graph(self):
"""
# Build graph
graph = MigrationGraph()
+ graph.add_node(("app_a", "0001"), None)
+ graph.add_node(("app_a", "0002"), None)
+ graph.add_node(("app_a", "0003"), None)
+ graph.add_node(("app_a", "0004"), None)
+ graph.add_node(("app_b", "0001"), None)
+ graph.add_node(("app_b", "0002"), None)
+ graph.add_node(("app_c", "0001"), None)
+ graph.add_node(("app_c", "0002"), None)
graph.add_dependency(("app_a", "0004"), ("app_a", "0003"))
graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
@@ -104,6 +118,11 @@ def test_circular_graph(self):
"""
# Build graph
graph = MigrationGraph()
+ graph.add_node(("app_a", "0001"), None)
+ graph.add_node(("app_a", "0002"), None)
+ graph.add_node(("app_a", "0003"), None)
+ graph.add_node(("app_b", "0001"), None)
+ graph.add_node(("app_b", "0002"), None)
graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
graph.add_dependency(("app_a", "0001"), ("app_b", "0002"))
Please sign in to comment.
Something went wrong with that request. Please try again.