Fix creation of link when reloading a project

Fix https://github.com/GNS3/gns3-gui/issues/1457
This commit is contained in:
Julien Duponchelle committed 2016-09-02 14:39:38 +02:00
1 parent 0afd7b78b7
commit 3ce3f925ae
8 files changed
+192 -107

No files matched your search

+3 -1
View File
@@ -254,7 +254,9 @@ def test_addLink(async_run, project, controller):
controller._notification = MagicMock()
link = async_run(project.add_link())
async_run(link.add_node(vm1, 3, 1))
async_run(link.add_node(vm2, 4, 2))
with asyncio_patch("gns3server.controller.udp_link.UDPLink.create") as mock_udp_create:
async_run(link.add_node(vm2, 4, 2))
assert mock_udp_create.called
assert len(link._nodes) == 2
controller.notification.emit.assert_any_call("link.created", link.__json__())