def test_preprocessor_service_no_service(patch, magic, tree): patch.object(Preprocessor, 'service_arguments') tree.node.return_value = None Preprocessor.service(tree) assert Preprocessor.service_arguments.call_count == 0
def test_preprocessor_service(patch, magic, tree): patch.object(Preprocessor, 'service_arguments') Preprocessor.service(tree) tree.node.assert_called_with('service_block.service') Preprocessor.service_arguments.assert_called_with(tree, tree.node())