Loading tests/migrations/test_graph.py +13 −0 Original line number Diff line number Diff line Loading @@ -133,3 +133,16 @@ class GraphTests(TestCase): CircularDependencyError, graph.forwards_plan, ("app_a", "0003"), ) def test_plan_invalid_node(self): """ Tests for forwards/backwards_plan of nonexistent node. """ graph = MigrationGraph() message = "Node ('app_b', '0001') not a valid node" with self.assertRaisesMessage(ValueError, message): graph.forwards_plan(("app_b", "0001")) with self.assertRaisesMessage(ValueError, message): graph.backwards_plan(("app_b", "0001")) Loading
tests/migrations/test_graph.py +13 −0 Original line number Diff line number Diff line Loading @@ -133,3 +133,16 @@ class GraphTests(TestCase): CircularDependencyError, graph.forwards_plan, ("app_a", "0003"), ) def test_plan_invalid_node(self): """ Tests for forwards/backwards_plan of nonexistent node. """ graph = MigrationGraph() message = "Node ('app_b', '0001') not a valid node" with self.assertRaisesMessage(ValueError, message): graph.forwards_plan(("app_b", "0001")) with self.assertRaisesMessage(ValueError, message): graph.backwards_plan(("app_b", "0001"))