1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-12-01 04:38:12 +00:00

Fix tests

This commit is contained in:
Julien Duponchelle 2015-05-04 21:29:28 +02:00
parent c4054cf810
commit ee2dada88b

View File

@ -260,7 +260,6 @@ def test_control_vm_expect_text(vm, loop, running_subprocess_mock):
def test_build_command(vm, loop, fake_qemu_binary, port_manager):
os.environ["DISPLAY"] = "0:0"
with patch("gns3server.modules.qemu.qemu_vm.QemuVM._get_random_mac", return_value="00:00:ab:7e:b5:00"):
with asyncio_patch("asyncio.create_subprocess_exec", return_value=MagicMock()) as process:
cmd = loop.run_until_complete(asyncio.async(vm._build_command()))
assert cmd == [
@ -274,7 +273,7 @@ def test_build_command(vm, loop, fake_qemu_binary, port_manager):
"-serial",
"telnet:127.0.0.1:{},server,nowait".format(vm.console),
"-device",
"e1000,mac=00:00:ab:7e:b5:00,netdev=gns3-0",
"e1000,mac=00:00:ab:0e:0f:00,netdev=gns3-0",
"-netdev",
"user,id=gns3-0"
]