From 43ca53a089cd264c732d0323771efe2e4083c50a Mon Sep 17 00:00:00 2001 From: grossmj Date: Thu, 9 Sep 2021 16:54:16 +0930 Subject: [PATCH] Fix tests --- gns3server/controller/node.py | 3 +-- tests/compute/qemu/test_qemu_vm.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/gns3server/controller/node.py b/gns3server/controller/node.py index 440dd5d7..c6a046e4 100644 --- a/gns3server/controller/node.py +++ b/gns3server/controller/node.py @@ -296,8 +296,7 @@ class Node: try: if not val.startswith(":") and os.path.isabs(val): - server_config = Config.instance().get_section_config("Server") - default_symbol_directory = os.path.expanduser(server_config.get("images_path", "~/GNS3/symbols")) + default_symbol_directory = Config.instance().settings.Server.symbols_path if os.path.commonprefix([default_symbol_directory, val]) != default_symbol_directory: val = os.path.basename(val) except OSError: diff --git a/tests/compute/qemu/test_qemu_vm.py b/tests/compute/qemu/test_qemu_vm.py index 52e53d0d..429d7a7b 100644 --- a/tests/compute/qemu/test_qemu_vm.py +++ b/tests/compute/qemu/test_qemu_vm.py @@ -914,8 +914,8 @@ async def test_run_with_kvm_linux(linux_platform, vm): async def test_run_with_kvm_linux_options_no_kvm(linux_platform, vm): with patch("os.path.exists", return_value=True) as os_path: - vm.manager.config.set("Qemu", "enable_kvm", True) - assert await vm._run_with_hardware_acceleration("qemu-system-x86_64", "-no-kvm") is False + vm.manager.config.settings.Qemu.enable_hardware_acceleration = True + assert await vm._run_with_hardware_acceleration("qemu-system-x86_64", "-machine accel=tcg") is False @pytest.mark.asyncio