mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-30 21:03:49 +02:00
Fix tests
This commit is contained in:
parent
c4054cf810
commit
ee2dada88b
@ -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):
|
def test_build_command(vm, loop, fake_qemu_binary, port_manager):
|
||||||
|
|
||||||
os.environ["DISPLAY"] = "0:0"
|
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:
|
with asyncio_patch("asyncio.create_subprocess_exec", return_value=MagicMock()) as process:
|
||||||
cmd = loop.run_until_complete(asyncio.async(vm._build_command()))
|
cmd = loop.run_until_complete(asyncio.async(vm._build_command()))
|
||||||
assert cmd == [
|
assert cmd == [
|
||||||
@ -274,7 +273,7 @@ def test_build_command(vm, loop, fake_qemu_binary, port_manager):
|
|||||||
"-serial",
|
"-serial",
|
||||||
"telnet:127.0.0.1:{},server,nowait".format(vm.console),
|
"telnet:127.0.0.1:{},server,nowait".format(vm.console),
|
||||||
"-device",
|
"-device",
|
||||||
"e1000,mac=00:00:ab:7e:b5:00,netdev=gns3-0",
|
"e1000,mac=00:00:ab:0e:0f:00,netdev=gns3-0",
|
||||||
"-netdev",
|
"-netdev",
|
||||||
"user,id=gns3-0"
|
"user,id=gns3-0"
|
||||||
]
|
]
|
||||||
|
Loading…
Reference in New Issue
Block a user