Item => Shape

This commit is contained in:
Julien Duponchelle committed 2016-06-21 09:49:16 +02:00
1 parent 85ebac7eb3
commit 116135b9dc
12 files changed
+125 -125

No files matched your search

+4 -4
View File
@@ -38,7 +38,7 @@ def test_project_to_topology_empty(tmpdir):
"nodes": [],
"links": [],
"computes": [],
"items": []
"shapes": []
},
"type": "topology",
"version": __version__
@@ -58,14 +58,14 @@ def test_basic_topology(tmpdir, async_run, controller):
async_run(link.add_node(node1, 0, 0))
async_run(link.add_node(node2, 0, 0))
item = async_run(project.add_item(svg="<svg></svg>"))
shape = async_run(project.add_shape(svg="<svg></svg>"))
topo = project_to_topology(project)
assert len(topo["topology"]["nodes"]) == 2
assert node1.__json__(topology_dump=True) in topo["topology"]["nodes"]
assert topo["topology"]["links"][0] == link.__json__(topology_dump=True)
assert topo["topology"]["computes"][0] == compute.__json__(topology_dump=True)
assert topo["topology"]["items"][0] == item.__json__(topology_dump=True)
assert topo["topology"]["shapes"][0] == shape.__json__(topology_dump=True)
def test_load_topology(tmpdir):
@@ -77,7 +77,7 @@ def test_load_topology(tmpdir):
"nodes": [],
"links": [],
"computes": [],
"items": []
"shapes": []
},
"type": "topology",
"version": __version__}