diff --git a/tests/handlers/api/test_vpcs.py b/tests/handlers/api/test_vpcs.py index 5970306e..736fb953 100644 --- a/tests/handlers/api/test_vpcs.py +++ b/tests/handlers/api/test_vpcs.py @@ -52,7 +52,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 a33d4397..b4fe902a 100644 --- a/tests/modules/vpcs/test_vpcs_vm.py +++ b/tests/modules/vpcs/test_vpcs_vm.py @@ -200,7 +200,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