1818from sqlmesh .schedulers .airflow .operators import targets
1919from sqlmesh .utils .date import to_datetime
2020
21+ pytest_plugins = ["tests.schedulers.airflow.operators.fixtures" ]
2122pytestmark = pytest .mark .airflow
2223
2324
@@ -29,7 +30,9 @@ def model() -> Model:
2930 )
3031
3132
32- def test_evaluation_target_execute (mocker : MockerFixture , make_snapshot : t .Callable , model : Model ):
33+ def test_evaluation_target_execute (
34+ mocker : MockerFixture , make_snapshot : t .Callable , model : Model , set_airflow_as_library
35+ ):
3336 interval_ds = to_datetime ("2022-01-01" )
3437 logical_ds = to_datetime ("2022-01-02" )
3538
@@ -76,7 +79,9 @@ def test_evaluation_target_execute(mocker: MockerFixture, make_snapshot: t.Calla
7679 )
7780
7881
79- def test_evaluation_target_execute_seed_model (mocker : MockerFixture , make_snapshot : t .Callable ):
82+ def test_evaluation_target_execute_seed_model (
83+ mocker : MockerFixture , make_snapshot : t .Callable , set_airflow_as_library
84+ ):
8085 interval_ds = to_datetime ("2022-01-01" )
8186 logical_ds = to_datetime ("2022-01-02" )
8287
@@ -135,7 +140,9 @@ def test_evaluation_target_execute_seed_model(mocker: MockerFixture, make_snapsh
135140 )
136141
137142
138- def test_cleanup_target_execute (mocker : MockerFixture , make_snapshot : t .Callable , model : Model ):
143+ def test_cleanup_target_execute (
144+ mocker : MockerFixture , make_snapshot : t .Callable , model : Model , set_airflow_as_library
145+ ):
139146 snapshot = make_snapshot (model )
140147 snapshot .categorize_as (SnapshotChangeCategory .BREAKING )
141148
@@ -181,7 +188,7 @@ def test_cleanup_target_execute(mocker: MockerFixture, make_snapshot: t.Callable
181188
182189
183190def test_cleanup_target_skip_execution (
184- mocker : MockerFixture , make_snapshot : t .Callable , model : Model
191+ mocker : MockerFixture , make_snapshot : t .Callable , model : Model , set_airflow_as_library
185192):
186193 snapshot = make_snapshot (model )
187194 snapshot .version = "test_version"
0 commit comments