From e5a7eb74ed69cf0f94ece63f006cf3d269e6ca92 Mon Sep 17 00:00:00 2001 From: ziajka Date: Tue, 5 Sep 2017 10:38:17 +0200 Subject: [PATCH] Fix project tests --- tests/controller/test_import_project.py | 4 ++++ tests/controller/test_project.py | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/controller/test_import_project.py b/tests/controller/test_import_project.py index 7e03ea28..c5667ce4 100644 --- a/tests/controller/test_import_project.py +++ b/tests/controller/test_import_project.py @@ -176,6 +176,8 @@ def test_import_iou_linux_no_vm(linux_platform, async_run, tmpdir, controller): """ project_id = str(uuid.uuid4()) + controller._computes["local"] = AsyncioMagicMock() + topology = { "project_id": str(uuid.uuid4()), "name": "test", @@ -361,6 +363,8 @@ def test_import_node_id(linux_platform, async_run, tmpdir, controller): """ project_id = str(uuid.uuid4()) + controller._computes["local"] = AsyncioMagicMock() + topology = { "project_id": str(uuid.uuid4()), "name": "test", diff --git a/tests/controller/test_project.py b/tests/controller/test_project.py index 1fd54d47..67a16971 100644 --- a/tests/controller/test_project.py +++ b/tests/controller/test_project.py @@ -425,8 +425,7 @@ def test_open_close(async_run, controller): def test_open_auto_start(async_run, controller): - project = Project(controller=controller, status="closed", name="Test") - project.auto_start = True + project = Project(controller=controller, status="closed", name="Test", auto_start=True) project.start_all = AsyncioMagicMock() async_run(project.open()) assert project.start_all.called