From 4d50d00b3e47fa85359ef7a276b0f68de3129dd8 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Thu, 21 May 2015 11:46:55 +0200 Subject: [PATCH] Fix test suite on Windows --- tests/handlers/api/test_vpcs.py | 4 ++-- tests/modules/vpcs/test_vpcs_vm.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/handlers/api/test_vpcs.py b/tests/handlers/api/test_vpcs.py index 473a533e..5da78bc1 100644 --- a/tests/handlers/api/test_vpcs.py +++ b/tests/handlers/api/test_vpcs.py @@ -42,7 +42,7 @@ def test_vpcs_get(server, project, vm): assert response.route == "/projects/{project_id}/vpcs/vms/{vm_id}" assert response.json["name"] == "PC TEST 1" assert response.json["project_id"] == project.id - assert response.json["startup_script_path"] == None + assert response.json["startup_script_path"] is None def test_vpcs_create_startup_script(server, project): @@ -51,7 +51,7 @@ def test_vpcs_create_startup_script(server, project): assert response.route == "/projects/{project_id}/vpcs/vms" assert response.json["name"] == "PC TEST 1" assert response.json["project_id"] == project.id - assert response.json["startup_script"] == "ip 192.168.1.2\necho TEST" + assert response.json["startup_script"] == os.linesep.join(["ip 192.168.1.2", "echo TEST"]) assert response.json["startup_script_path"] == "startup.vpc" diff --git a/tests/modules/vpcs/test_vpcs_vm.py b/tests/modules/vpcs/test_vpcs_vm.py index c16e10f0..ad954640 100644 --- a/tests/modules/vpcs/test_vpcs_vm.py +++ b/tests/modules/vpcs/test_vpcs_vm.py @@ -190,7 +190,7 @@ def test_update_startup_script_h(vm): def test_get_startup_script(vm): - content = "echo GNS3 VPCS\nip 192.168.1.2\n" + content = os.linesep.join(["echo GNS3 VPCS", "ip 192.168.1.2"]) vm.startup_script = content assert vm.startup_script == content