mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
1 parent
9acb2ceda1
commit
c684c554bf
4 files changed
+17
-17
No files matched your search
@@ -337,6 +337,7 @@ def test_set_qemu_path_kvm_binary(vm, fake_qemu_binary):
|
||||
|
||||
async def test_set_platform(compute_project, manager):
|
||||
|
||||
manager.config_disk = None # avoids conflict with config.img support
|
||||
with patch("shutil.which", return_value="/bin/qemu-system-x86_64") as which_mock:
|
||||
with patch("gns3server.compute.qemu.QemuVM._check_qemu_path"):
|
||||
vm = QemuVM("test", "00010203-0405-0607-0809-0a0b0c0d0e0f", compute_project, manager, platform="x86_64")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
import uuid
|
||||
import os
|
||||
import pytest
|
||||
from unittest.mock import patch
|
||||
from unittest.mock import patch, MagicMock
|
||||
from tests.utils import asyncio_patch
|
||||
|
||||
from gns3server.compute.vpcs import VPCS
|
||||
@@ -41,6 +41,7 @@ async def vpcs(loop, port_manager):
|
||||
async def qemu(loop, port_manager):
|
||||
|
||||
Qemu._instance = None
|
||||
Qemu._init_config_disk = MagicMock() # do not create the config.img image
|
||||
qemu = Qemu.instance()
|
||||
qemu.port_manager = port_manager
|
||||
return qemu
|
||||
|
||||
Reference in new issue
Block a user