Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve appflow deprecations in tests #40298

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions tests/deprecations_ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@
- tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py::TestRedshiftAsyncHook::test_pause_cluster
- tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py::TestRedshiftAsyncHook::test_resume_cluster
- tests/providers/amazon/aws/deferrable/hooks/test_redshift_cluster.py::TestRedshiftAsyncHook::test_resume_cluster_exception
- tests/providers/amazon/aws/operators/test_appflow.py::test_base_aws_op_attributes
- tests/providers/amazon/aws/operators/test_appflow.py::test_run
- tests/providers/amazon/aws/secrets/test_secrets_manager.py::TestSecretsManagerBackend::test_get_conn_value_broken_field_mode
- tests/providers/amazon/aws/secrets/test_secrets_manager.py::TestSecretsManagerBackend::test_get_conn_value_broken_field_mode_extra_words_added
- tests/providers/amazon/aws/secrets/test_secrets_manager.py::TestSecretsManagerBackend::test_get_connection_broken_field_mode_extra_allows_nested_json
Expand Down
10 changes: 8 additions & 2 deletions tests/providers/amazon/aws/operators/test_appflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def run_assertions_base(appflow_conn, tasks):

@pytest.mark.db_test
def test_run(appflow_conn, ctx, waiter_mock):
operator = AppflowRunOperator(**DUMP_COMMON_ARGS)
args = DUMP_COMMON_ARGS.copy()
args.pop("source")
operator = AppflowRunOperator(**args)
operator.execute(ctx) # type: ignore
appflow_conn.start_flow.assert_called_once_with(flowName=FLOW_NAME)
appflow_conn.describe_flow_execution_records.assert_called_once()
Expand Down Expand Up @@ -224,7 +226,11 @@ def test_short_circuit(appflow_conn, ctx):
id="run-daily-op",
),
pytest.param(AppflowRunFullOperator, DUMP_COMMON_ARGS, id="run-full-op"),
pytest.param(AppflowRunOperator, DUMP_COMMON_ARGS, id="run-op"),
pytest.param(
AppflowRunOperator,
dict((i, DUMP_COMMON_ARGS[i]) for i in DUMP_COMMON_ARGS if i != "source"),
id="run-op",
),
pytest.param(
AppflowRecordsShortCircuitOperator,
dict(task_id=SHORT_CIRCUIT_TASK_ID, flow_name=FLOW_NAME, appflow_run_task_id=TASK_ID),
Expand Down