From 938696032c76b53b5e3b9262049cb7f445fe5717 Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Wed, 17 Aug 2016 11:05:16 +0200 Subject: [PATCH] Fix tests --- gns3server/utils/picture.py | 3 ++- tests/controller/test_project.py | 2 +- tests/controller/test_topology.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/gns3server/utils/picture.py b/gns3server/utils/picture.py index 34823113..4424ad9a 100644 --- a/gns3server/utils/picture.py +++ b/gns3server/utils/picture.py @@ -19,6 +19,7 @@ import io import struct from xml.etree.ElementTree import ElementTree + def get_size(data, default_width=0, default_height=0): """ Get image size @@ -26,7 +27,6 @@ def get_size(data, default_width=0, default_height=0): :return: Tuple (width, height, filetype) """ - height = default_height width = default_width filetype = None @@ -106,6 +106,7 @@ def get_size(data, default_width=0, default_height=0): return width, height, filetype + def _svg_convert_size(size): """ Convert svg size to the px version diff --git a/tests/controller/test_project.py b/tests/controller/test_project.py index 7747ff36..5194162b 100644 --- a/tests/controller/test_project.py +++ b/tests/controller/test_project.py @@ -66,7 +66,7 @@ def test_json(tmpdir): "status": "opened", "filename": "Test.gns3", "auto_start": False, - "auto_close": False, + "auto_close": True, "auto_open": False } diff --git a/tests/controller/test_topology.py b/tests/controller/test_topology.py index 400adddb..550b2a6e 100644 --- a/tests/controller/test_topology.py +++ b/tests/controller/test_topology.py @@ -35,7 +35,7 @@ def test_project_to_topology_empty(tmpdir): "project_id": project.id, "name": "Test", "auto_start": False, - "auto_close": False, + "auto_close": True, "auto_open": False, "revision": 5, "topology": {