From 2de284ea3036dfeeb1be7bfed436dcbe2ddd4b2d Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Mon, 16 Jan 2017 10:13:13 +0100 Subject: [PATCH] Fix some tests on travis --- gns3server/compute/virtualbox/virtualbox_vm.py | 2 +- tests/handlers/api/compute/test_cloud.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gns3server/compute/virtualbox/virtualbox_vm.py b/gns3server/compute/virtualbox/virtualbox_vm.py index 44a01d17..7cd121ce 100644 --- a/gns3server/compute/virtualbox/virtualbox_vm.py +++ b/gns3server/compute/virtualbox/virtualbox_vm.py @@ -209,7 +209,7 @@ class VirtualBoxVM(BaseNode): if os.path.exists(self._linked_vbox_file()): tree = ET.parse(self._linked_vbox_file()) machine = tree.getroot().find("{http://www.virtualbox.org/}Machine") - if machine: + if machine is not None: machine.set("uuid", "{" + self.id + "}") tree.write(self._linked_vbox_file()) diff --git a/tests/handlers/api/compute/test_cloud.py b/tests/handlers/api/compute/test_cloud.py index 611d55c6..7bfad05c 100644 --- a/tests/handlers/api/compute/test_cloud.py +++ b/tests/handlers/api/compute/test_cloud.py @@ -54,7 +54,7 @@ def test_cloud_get(http_compute, project, vm): assert response.route == "/projects/{project_id}/cloud/nodes/{node_id}" assert response.json["name"] == "Cloud 1" assert response.json["project_id"] == project.id - assert response.json["status"] == "stopped" + assert response.json["status"] == "started" def test_cloud_nio_create_udp(http_compute, vm):