This is an automated email from the ASF dual-hosted git repository.
shahar1 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 5376be8924c Remove duplicate Calendar-to-GCS transfer test (#75895)
5376be8924c is described below
commit 5376be8924caca5eb16a19b7ed2464211da57859
Author: Hussein Awala <[email protected]>
AuthorDate: Thu Oct 29 06:01:48 2026 +0100
Remove duplicate Calendar-to-GCS transfer test (#75895)
Both cases set unwrap_single=False and return_gcs_uri=True with identical
mocked interactions and output assertions; the explicit option-named test
remains.
---
.../google/cloud/transfers/test_calendar_to_gcs.py | 54 ----------------------
1 file changed, 54 deletions(-)
diff --git
a/providers/google/tests/unit/google/cloud/transfers/test_calendar_to_gcs.py
b/providers/google/tests/unit/google/cloud/transfers/test_calendar_to_gcs.py
index 8fb602414d5..b119e347181 100644
--- a/providers/google/tests/unit/google/cloud/transfers/test_calendar_to_gcs.py
+++ b/providers/google/tests/unit/google/cloud/transfers/test_calendar_to_gcs.py
@@ -126,60 +126,6 @@ class TestGoogleCalendarToGCSOperator:
# Assert dest_file_name is returned when unwrap_single=True and
return_gcs_uri=False (default)
assert result == expected_dest_file_name
-
@mock.patch("airflow.providers.google.cloud.transfers.calendar_to_gcs.GoogleCalendarHook")
- @mock.patch(
-
"airflow.providers.google.cloud.transfers.calendar_to_gcs.GoogleCalendarToGCSOperator._upload_data"
- )
- def test_execute_with_unwrap_single_false(self, mock_upload_data,
mock_calendar_hook):
- context = {}
- data = [EVENT]
- expected_dest_file_name = f"{PATH.strip('/')}/{CALENDAR_ID}.json"
- expected_gcs_uri = f"gs://{BUCKET}/{expected_dest_file_name}"
- mock_upload_data.return_value = (expected_dest_file_name,
expected_gcs_uri)
- mock_calendar_hook.return_value.get_events.return_value = data
-
- op = GoogleCalendarToGCSOperator(
- api_version=API_VERSION,
- task_id="test_task",
- calendar_id=CALENDAR_ID,
- destination_bucket=BUCKET,
- destination_path=PATH,
- gcp_conn_id=GCP_CONN_ID,
- impersonation_chain=IMPERSONATION_CHAIN,
- unwrap_single=False,
- return_gcs_uri=True,
- )
- result = op.execute(context)
-
- mock_calendar_hook.assert_called_once_with(
- api_version=API_VERSION,
- gcp_conn_id=GCP_CONN_ID,
- impersonation_chain=IMPERSONATION_CHAIN,
- )
-
- mock_calendar_hook.return_value.get_events.assert_called_once_with(
- calendar_id=CALENDAR_ID,
- i_cal_uid=None,
- max_attendees=None,
- max_results=None,
- order_by=None,
- private_extended_property=None,
- q=None,
- shared_extended_property=None,
- show_deleted=None,
- show_hidden_invitation=None,
- single_events=None,
- sync_token=None,
- time_max=None,
- time_min=None,
- time_zone=None,
- updated_min=None,
- )
-
- mock_upload_data.assert_called_once_with(data)
- # Assert list of GCS URIs is returned when unwrap_single=False and
return_gcs_uri=True
- assert result == [expected_gcs_uri]
-
@mock.patch("airflow.providers.google.cloud.transfers.calendar_to_gcs.GoogleCalendarHook")
@mock.patch(
"airflow.providers.google.cloud.transfers.calendar_to_gcs.GoogleCalendarToGCSOperator._upload_data"