mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
1 parent
c361d27531
commit
d853ffe791
3 files changed
+11
-6
No files matched your search
@@ -25,7 +25,9 @@ import re
|
||||
from tests.utils import asyncio_patch
|
||||
|
||||
|
||||
from unittest import mock
|
||||
from unittest.mock import patch, MagicMock
|
||||
|
||||
from gns3server.modules.qemu.qemu_vm import QemuVM
|
||||
from gns3server.modules.qemu.qemu_error import QemuError
|
||||
from gns3server.modules.qemu import Qemu
|
||||
@@ -276,9 +278,9 @@ def test_set_platform(project, manager):
|
||||
with patch("gns3server.modules.qemu.QemuVM._check_qemu_path"):
|
||||
vm = QemuVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", project, manager, platform="x86_64")
|
||||
if sys.platform.startswith("win"):
|
||||
which_mock.assert_called_with("qemu-system-x86_64w.exe")
|
||||
which_mock.assert_called_with("qemu-system-x86_64w.exe", path=mock.ANY)
|
||||
else:
|
||||
which_mock.assert_called_with("qemu-system-x86_64")
|
||||
which_mock.assert_called_with("qemu-system-x86_64", path=mock.ANY)
|
||||
assert vm.platform == "x86_64"
|
||||
assert vm.qemu_path == "/bin/qemu-system-x86_64"
|
||||
|
||||
|
||||
Reference in new issue
Block a user