From e014d36ad265750ca7d23e2542e47b3b3480243e Mon Sep 17 00:00:00 2001 From: grossmj Date: Tue, 6 Oct 2020 17:40:36 +1030 Subject: [PATCH] Skip tests not working on Windows. --- tests/handlers/api/compute/test_qemu.py | 1 + tests/handlers/api/controller/test_node.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/handlers/api/compute/test_qemu.py b/tests/handlers/api/compute/test_qemu.py index 3c349797..d88ee33d 100644 --- a/tests/handlers/api/compute/test_qemu.py +++ b/tests/handlers/api/compute/test_qemu.py @@ -280,6 +280,7 @@ async def test_images(compute_api, fake_qemu_vm): assert response.json == [{"filename": "linux载.img", "path": "linux载.img", "md5sum": "c4ca4238a0b923820dcc509a6f75849b", "filesize": 1}] +@pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work on Windows") async def test_upload_image(compute_api, tmpdir): with patch("gns3server.compute.Qemu.get_images_directory", return_value=str(tmpdir)): diff --git a/tests/handlers/api/controller/test_node.py b/tests/handlers/api/controller/test_node.py index 61c7662e..bd0f60a2 100644 --- a/tests/handlers/api/controller/test_node.py +++ b/tests/handlers/api/controller/test_node.py @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - +import sys import pytest from unittest.mock import MagicMock @@ -242,6 +242,7 @@ async def test_post_file(controller_api, project, node, compute): assert response.status == 404 +@pytest.mark.skipif(sys.platform.startswith("win"), reason="Does not work on Windows") async def test_get_and_post_with_nested_paths_normalization(controller_api, project, node, compute): response = MagicMock()