Example #1
0
def test_update_pipeline_non_existent(hook: AzureDataFactoryHook, user_args,
                                      sdk_args):
    hook._pipeline_exists = Mock(return_value=False)

    with pytest.raises(AirflowException, match=r"Pipeline .+ does not exist"):
        hook.update_pipeline(*user_args)
Example #2
0
def test_update_pipeline(hook: AzureDataFactoryHook, user_args, sdk_args):
    hook._pipeline_exists = Mock(return_value=True)
    hook.update_pipeline(*user_args)

    hook._conn.pipelines.create_or_update.assert_called_with(*sdk_args)