MCPcopy
hub / github.com/django/django / test_validate_consistency_dummy

Method test_validate_consistency_dummy

tests/migrations/test_graph.py:299–310  ·  view source on GitHub ↗

validate_consistency() raises an error if there's an isolated dummy node.

(self)

Source from the content-addressed store, hash-verified

297 graph.validate_consistency()
298
299 def test_validate_consistency_dummy(self):
300 """
301 validate_consistency() raises an error if there's an isolated dummy
302 node.
303 """
304 msg = "app_a.0001 (req'd by app_b.0002) is missing!"
305 graph = MigrationGraph()
306 graph.add_dummy_node(
307 key=("app_a", "0001"), origin="app_b.0002", error_message=msg
308 )
309 with self.assertRaisesMessage(NodeNotFoundError, msg):
310 graph.validate_consistency()
311
312 def test_remove_replaced_nodes(self):
313 """

Callers

nothing calls this directly

Calls 4

add_dummy_nodeMethod · 0.95
validate_consistencyMethod · 0.95
MigrationGraphClass · 0.90
assertRaisesMessageMethod · 0.80

Tested by

no test coverage detected