Skip to content
9 changes: 4 additions & 5 deletions tests/test_example_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import sys
from pathlib import Path
from unittest.mock import patch

try:
from functools import cache
Expand Down Expand Up @@ -125,9 +124,9 @@ def test_example_dag(session, dag_id: str):
reason="See PR: https://github.com/apache/airflow/pull/34585 and Airflow 2.9.0 and 2.9.1 have a breaking change in Dataset URIs, and Cosmos errors if `emit_datasets` is not False",
)
@pytest.mark.integration
@patch("cosmos.operators.local.settings.enable_setup_async_task", False)
@patch("cosmos.operators.local.settings.enable_teardown_async_task", False)
@patch("cosmos.operators._asynchronous.bigquery.settings.enable_setup_async_task", False)
def test_async_example_dag_without_setup_task(session):
def test_async_example_dag_without_setup_task(session, monkeypatch):
monkeypatch.setenv("AIRFLOW__COSMOS__ENABLE_SETUP_ASYNC_TASK", "false")
monkeypatch.setenv("AIRFLOW__COSMOS__ENABLE_TEARDOWN_ASYNC_TASK", "false")

for dag_id in async_dag_ids:
run_dag(dag_id)