mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-03 05:51:15 +02:00
Change seperator for additonnal images directory otherwise bug on windows
This commit is contained in:
5 files changed
+9
-9
No files matched your search
@@ -136,7 +136,7 @@ def test_get_abs_image_additional_image_paths(qemu, tmpdir):
|
||||
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={
|
||||
"images_path": str(tmpdir / "images1"),
|
||||
"additional_images_path": "/tmp/null24564:{}".format(str(tmpdir / "images2")),
|
||||
"additional_images_path": "/tmp/null24564;{}".format(str(tmpdir / "images2")),
|
||||
"local": False}):
|
||||
assert qemu.get_abs_image_path("test1.bin") == path1
|
||||
assert qemu.get_abs_image_path("test2.bin") == path2
|
||||
|
||||
+1
-2
@@ -23,8 +23,7 @@ def test_force_unix_path():
|
||||
assert force_unix_path("a/b") == "a/b"
|
||||
assert force_unix_path("a\\b") == "a/b"
|
||||
assert force_unix_path("a\\b\\..\\c") == "a/c"
|
||||
if sys.platform.startswith("win"):
|
||||
assert force_unix_path("C:\Temp") == "C:/Temp"
|
||||
assert force_unix_path("C:\Temp") == "C:/Temp"
|
||||
|
||||
|
||||
def test_macaddress_to_int():
|
||||
|
||||
@@ -34,7 +34,7 @@ def test_images_directories(tmpdir):
|
||||
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={
|
||||
"images_path": str(tmpdir / "images1"),
|
||||
"additional_images_path": "/tmp/null24564:{}".format(tmpdir / "images2"),
|
||||
"additional_images_path": "/tmp/null24564;{}".format(tmpdir / "images2"),
|
||||
"local": False}):
|
||||
|
||||
# /tmp/null24564 is ignored because doesn't exists
|
||||
@@ -115,7 +115,7 @@ def test_scan_for_images(tmpdir):
|
||||
|
||||
with patch("gns3server.config.Config.get_section_config", return_value={
|
||||
"images_path": str(tmpdir / "images1"),
|
||||
"additional_images_path": "/tmp/null24564:{}".format(tmpdir / "images2"),
|
||||
"additional_images_path": "/tmp/null24564;{}".format(tmpdir / "images2"),
|
||||
"local": False}):
|
||||
|
||||
assert scan_for_images("dynamips") == [str(path1), str(path2)]
|
||||
|
||||
Reference in new issue
Block a user