[tests] adding a spec to magicmock of nodes to avoid it being seen as partially configured nodes

This commit is contained in:
Romain Dorgueil
2017-12-02 14:51:33 +01:00
parent 47c676a068
commit a8ff1b4df1

View File

@ -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))