diff --git a/providers/google/tests/unit/google/cloud/hooks/test_bigquery.py b/providers/google/tests/unit/google/cloud/hooks/test_bigquery.py index c6a10815fbdc6..8d51cf4b7ea48 100644 --- a/providers/google/tests/unit/google/cloud/hooks/test_bigquery.py +++ b/providers/google/tests/unit/google/cloud/hooks/test_bigquery.py @@ -323,7 +323,12 @@ def test_run_grant_dataset_view_access_granting(self, mock_update, mock_get): ) mock_get.assert_called_once_with(project_id=PROJECT_ID, dataset_id=DATASET_ID) - assert view_access in dataset.access_entries + assert any( + entry.role == view_access.role + and entry.entity_type == view_access.entity_type + and entry.entity_id == view_access.entity_id + for entry in dataset.access_entries + ), f"View access entry not found in {dataset.access_entries}" mock_update.assert_called_once_with( fields=["access"], dataset_resource=dataset.to_api_repr(), diff --git a/providers/standard/src/airflow/providers/standard/operators/python.py b/providers/standard/src/airflow/providers/standard/operators/python.py index 37aa79c33433e..01e184d924b7d 100644 --- a/providers/standard/src/airflow/providers/standard/operators/python.py +++ b/providers/standard/src/airflow/providers/standard/operators/python.py @@ -859,7 +859,14 @@ def _iter_serializable_context_keys(self): # If we're using system packages, assume both are present found_airflow = found_pendulum = True else: - for raw_str in self.requirements: + requirements_iterable = [] + if isinstance(self.requirements, str): + requirements_iterable = self.requirements.splitlines() + else: + for item in self.requirements: + requirements_iterable.extend(item.splitlines()) + + for raw_str in requirements_iterable: line = raw_str.strip() # Skip blank lines and full‐line comments if not line or line.startswith("#"):