1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Fix more tests

This commit is contained in:
grossmj 2023-01-10 11:09:27 +08:00
parent e9c95ff299
commit eb3fc1bb3a
2 changed files with 3 additions and 3 deletions

View File

@ -32,7 +32,7 @@ from unittest.mock import patch, MagicMock
def fake_qemu_img_binary(tmpdir): def fake_qemu_img_binary(tmpdir):
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
bin_path = str(tmpdir / "qemu-img.exe") bin_path = str(tmpdir / "qemu-img.EXE")
else: else:
bin_path = str(tmpdir / "qemu-img") bin_path = str(tmpdir / "qemu-img")
with open(bin_path, "w+") as f: with open(bin_path, "w+") as f:

View File

@ -46,7 +46,7 @@ def fake_qemu_img_binary(monkeypatch, tmpdir):
monkeypatch.setenv("PATH", str(tmpdir)) monkeypatch.setenv("PATH", str(tmpdir))
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
bin_path = os.path.join(os.environ["PATH"], "qemu-img.exe") bin_path = os.path.join(os.environ["PATH"], "qemu-img.EXE")
else: else:
bin_path = os.path.join(os.environ["PATH"], "qemu-img") bin_path = os.path.join(os.environ["PATH"], "qemu-img")
with open(bin_path, "w+") as f: with open(bin_path, "w+") as f:
@ -60,7 +60,7 @@ def fake_qemu_binary(monkeypatch, tmpdir):
monkeypatch.setenv("PATH", str(tmpdir)) monkeypatch.setenv("PATH", str(tmpdir))
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64w.exe") bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64w.EXE")
else: else:
bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64") bin_path = os.path.join(os.environ["PATH"], "qemu-system-x86_64")
with open(bin_path, "w+") as f: with open(bin_path, "w+") as f: