mirror of
https://github.com/GNS3/gns3-server.git
synced 2024-11-16 16:54:51 +02:00
Add tests for checking if path are correctly cleaned
This commit is contained in:
parent
691c2dfd8e
commit
b4434b5134
@ -24,6 +24,8 @@ 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"
|
assert force_unix_path("a\\b\\..\\c") == "a/c"
|
||||||
assert force_unix_path("C:\Temp") == "C:/Temp"
|
assert force_unix_path("C:\Temp") == "C:/Temp"
|
||||||
|
assert force_unix_path(force_unix_path("C:\Temp")) == "C:/Temp"
|
||||||
|
assert force_unix_path("a//b") == "a/b"
|
||||||
|
|
||||||
|
|
||||||
def test_macaddress_to_int():
|
def test_macaddress_to_int():
|
||||||
|
@ -133,7 +133,7 @@ def test_list_images(tmpdir):
|
|||||||
'filename': 'test2.image',
|
'filename': 'test2.image',
|
||||||
'filesize': 7,
|
'filesize': 7,
|
||||||
'md5sum': 'b0d5aa897d937aced5a6b1046e8f7e2e',
|
'md5sum': 'b0d5aa897d937aced5a6b1046e8f7e2e',
|
||||||
'path': force_unix_path(str(path2))
|
'path': str(path2)
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user