Fix tests.

This commit is contained in:
grossmj 2017-12-05 16:56:50 -06:00
parent cfe8e9e85c
commit dde2003168

View File

@ -388,9 +388,10 @@ def test_start_vm(controller, async_run):
"vmname": "GNS3 VM"
}
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM.start") as mock:
with asyncio_patch("gns3server.controller.compute.Compute.connect") as mock_connect:
async_run(controller.start())
assert mock.called
with asyncio_patch("gns3server.controller.gns3vm.vmware_gns3_vm.VMwareGNS3VM._check_network") as mock_check_network:
with asyncio_patch("gns3server.controller.compute.Compute.connect") as mock_connect:
async_run(controller.start())
assert mock.called
assert "local" in controller.computes
assert "vm" in controller.computes
assert len(controller.computes) == 2 # Local compute and vm are created