From b4434b5134c673bd5b7e79f135f4dfd9f582db74 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 18 Apr 2017 15:50:11 +0200 Subject: [PATCH] Add tests for checking if path are correctly cleaned --- tests/test_utils.py | 2 ++ tests/utils/test_images.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index af7d9815..0dbcc3b8 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -24,6 +24,8 @@ def test_force_unix_path(): assert force_unix_path("a\\b") == "a/b" assert force_unix_path("a\\b\\..\\c") == "a/c" 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(): diff --git a/tests/utils/test_images.py b/tests/utils/test_images.py index 7de59eb8..8b9b5c24 100644 --- a/tests/utils/test_images.py +++ b/tests/utils/test_images.py @@ -133,7 +133,7 @@ def test_list_images(tmpdir): 'filename': 'test2.image', 'filesize': 7, 'md5sum': 'b0d5aa897d937aced5a6b1046e8f7e2e', - 'path': force_unix_path(str(path2)) + 'path': str(path2) } ]