1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-11 08:30:57 +00:00

Test path with chinese charcaters in Qemu

Refs #120
This commit is contained in:
Julien Duponchelle 2015-04-01 18:24:36 +02:00
parent a3c8201bcc
commit 49f36a83bd

View File

@ -40,7 +40,8 @@ def manager(port_manager):
@pytest.fixture
def fake_qemu_img_binary():
bin_path = os.path.join(os.environ["PATH"], "qemu-img")
# Should not crash with unicode characters
bin_path = os.path.join(os.environ["PATH"], "qemu-img\u62FF")
with open(bin_path, "w+") as f:
f.write("1")
os.chmod(bin_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
@ -166,7 +167,8 @@ def test_set_qemu_path(vm, tmpdir, fake_qemu_binary):
with pytest.raises(QemuError):
vm.qemu_path = None
path = str(tmpdir / "bla")
# Should not crash with unicode characters
path = str(tmpdir / "bla\u62FF")
# Raise because file doesn't exists
with pytest.raises(QemuError):