@workflow
def operation_mapping3(ctx, value, **_):
    def expect_error(func):
        try:
            func('test.operation', kwargs={
                'value': value
            }).get()
        except __HOLE__, e:
            assert 'Duplicate' in e.message

    node1 = list(ctx.get_node('node1').instances)[0]
    node2_rel = list(list(ctx.get_node('node2').instances)[0].relationships)[0]
    node3_rel = list(list(ctx.get_node('node3').instances)[0].relationships)[0]
    expect_error(node1.execute_operation)
    expect_error(node2_rel.execute_source_operation)
    expect_error(node3_rel.execute_target_operation)
dataset/ETHPy150Open cloudify-cosmo/cloudify-manager/tests/mock_plugins/mock_workflows/workflows.py/operation_mapping3