Ejemplo n.º 1
0
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
Ejemplo n.º 2
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())