From a8ff1b4df1cc13f02b2755c71d4cd8331c12a6b5 Mon Sep 17 00:00:00 2001 From: Romain Dorgueil Date: Sat, 2 Dec 2017 14:51:33 +0100 Subject: [PATCH] [tests] adding a spec to magicmock of nodes to avoid it being seen as partially configured nodes --- tests/execution/contexts/test_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/execution/contexts/test_node.py b/tests/execution/contexts/test_node.py index c9c8f1f..5af665d 100644 --- a/tests/execution/contexts/test_node.py +++ b/tests/execution/contexts/test_node.py @@ -186,7 +186,7 @@ def test_node_tuple_dict(): def test_node_lifecycle_natural(): - func = MagicMock() + func = MagicMock(spec=object()) ctx = NodeExecutionContext(func) assert not any((ctx.started, ctx.stopped, ctx.killed, ctx.alive)) @@ -205,7 +205,7 @@ def test_node_lifecycle_natural(): def test_node_lifecycle_with_kill(): - func = MagicMock() + func = MagicMock(spec=object()) ctx = NodeExecutionContext(func) assert not any((ctx.started, ctx.stopped, ctx.killed, ctx.alive))