Change the way we look for Qemu path

Fix #302
This commit is contained in:
Julien Duponchelle committed 2015-08-27 18:27:17 +02:00
1 parent c361d27531
commit d853ffe791
3 files changed
+11 -6

No files matched your search

+4 -2
View File
@@ -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"