Skip to content

Commit 98786c9

Browse files
author
Harald Viemann
committed
Fix hard coded pks
This fix enables pytest to run the tests in a shuffled order. closes #12
1 parent 20c4797 commit 98786c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ def test_02_dag(self):
251251
)
252252
log.debug("Check attributes")
253253
self.assertEqual(nx_out.graph, {"test": "test"})
254-
self.assertEqual(nx_out.nodes[11], {"id": 11, "name": "root"})
255-
self.assertEqual(nx_out.edges[11, 14], {"id": 4, "name": "root a3"})
254+
self.assertEqual(nx_out.nodes[root.pk], {"id": root.pk, "name": "root"})
255+
self.assertEqual(nx_out.edges[root.pk, a3.pk], {"id": NetworkEdge.objects.get(parent=root, child=a3).pk, "name": "root a3"})
256256

257257
"""
258258
Simulate a basic irrigation canal network

0 commit comments

Comments
 (0)