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

Corrected grammar in migrations error message.

This commit is contained in:
Markus Bertheau
2014-09-10 22:54:28 +09:00
committed by Tim Graham
parent 1ac32e76ac
commit 61f56e239f
2 changed files with 6 additions and 4 deletions

View File

@@ -174,7 +174,8 @@ class GraphTests(TestCase):
graph.add_node(("app_b", "0001"), None)
graph.add_dependency("app_a.0003", ("app_a", "0003"), ("app_a", "0002"))
graph.add_dependency("app_a.0002", ("app_a", "0002"), ("app_a", "0001"))
with self.assertRaisesMessage(KeyError, "Migration app_a.0001 dependencies references nonexistent parent node ('app_b', '0002')"):
msg = "Migration app_a.0001 dependencies reference nonexistent parent node ('app_b', '0002')"
with self.assertRaisesMessage(KeyError, msg):
graph.add_dependency("app_a.0001", ("app_a", "0001"), ("app_b", "0002"))
def test_missing_child_nodes(self):
@@ -184,5 +185,6 @@ class GraphTests(TestCase):
# Build graph
graph = MigrationGraph()
graph.add_node(("app_a", "0001"), None)
with self.assertRaisesMessage(KeyError, "Migration app_a.0002 dependencies references nonexistent child node ('app_a', '0002')"):
msg = "Migration app_a.0002 dependencies reference nonexistent child node ('app_a', '0002')"
with self.assertRaisesMessage(KeyError, msg):
graph.add_dependency("app_a.0002", ("app_a", "0002"), ("app_a", "0001"))