Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix graph tests

  • Loading branch information...
commit 7f9a0b7061e78a43b97abd6a3716d1e2017d72e3 1 parent dfa7c5c
Andrew Godwin authored May 30, 2013

Showing 1 changed file with 19 additions and 0 deletions. Show diff stats Hide diff stats

  1. 19  tests/migrations/test_graph.py
19  tests/migrations/test_graph.py
@@ -17,6 +17,12 @@ def test_simple_graph(self):
17 17
         """
18 18
         # Build graph
19 19
         graph = MigrationGraph()
  20
+        graph.add_node(("app_a", "0001"), None)
  21
+        graph.add_node(("app_a", "0002"), None)
  22
+        graph.add_node(("app_a", "0003"), None)
  23
+        graph.add_node(("app_a", "0004"), None)
  24
+        graph.add_node(("app_b", "0001"), None)
  25
+        graph.add_node(("app_b", "0002"), None)
20 26
         graph.add_dependency(("app_a", "0004"), ("app_a", "0003"))
21 27
         graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
22 28
         graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
@@ -64,6 +70,14 @@ def test_complex_graph(self):
64 70
         """
65 71
         # Build graph
66 72
         graph = MigrationGraph()
  73
+        graph.add_node(("app_a", "0001"), None)
  74
+        graph.add_node(("app_a", "0002"), None)
  75
+        graph.add_node(("app_a", "0003"), None)
  76
+        graph.add_node(("app_a", "0004"), None)
  77
+        graph.add_node(("app_b", "0001"), None)
  78
+        graph.add_node(("app_b", "0002"), None)
  79
+        graph.add_node(("app_c", "0001"), None)
  80
+        graph.add_node(("app_c", "0002"), None)
67 81
         graph.add_dependency(("app_a", "0004"), ("app_a", "0003"))
68 82
         graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
69 83
         graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
@@ -104,6 +118,11 @@ def test_circular_graph(self):
104 118
         """
105 119
         # Build graph
106 120
         graph = MigrationGraph()
  121
+        graph.add_node(("app_a", "0001"), None)
  122
+        graph.add_node(("app_a", "0002"), None)
  123
+        graph.add_node(("app_a", "0003"), None)
  124
+        graph.add_node(("app_b", "0001"), None)
  125
+        graph.add_node(("app_b", "0002"), None)
107 126
         graph.add_dependency(("app_a", "0003"), ("app_a", "0002"))
108 127
         graph.add_dependency(("app_a", "0002"), ("app_a", "0001"))
109 128
         graph.add_dependency(("app_a", "0001"), ("app_b", "0002"))

0 notes on commit 7f9a0b7

Please sign in to comment.
Something went wrong with that request. Please try again.