From ea4596dee1cfc7a4838673ed3c3f1f4c30aee5b6 Mon Sep 17 00:00:00 2001 From: Quigley Malcolm Date: Tue, 1 Oct 2024 13:59:58 -0500 Subject: [PATCH] Update test_incremental_microbatch to use behavior flag instead of environment variable --- .../incremental/test_incremental_microbatch.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tests/functional/adapter/incremental/test_incremental_microbatch.py b/tests/functional/adapter/incremental/test_incremental_microbatch.py index d1bbbcea3..1338bb3b0 100644 --- a/tests/functional/adapter/incremental/test_incremental_microbatch.py +++ b/tests/functional/adapter/incremental/test_incremental_microbatch.py @@ -30,7 +30,14 @@ def models(self) -> str: "input_model.sql": microbatch_input_sql, } - @mock.patch.dict(os.environ, {"DBT_EXPERIMENTAL_MICROBATCH": "True"}) + @pytest.fixture(scope="class") + def project_config_update(self): + return { + "flags": { + "require_builtin_microbatch_strategy": True, + } + } + def test_execution_failure_no_partition_by(self, project): with patch_microbatch_end_time("2020-01-03 13:57:00"): _, stdout = run_dbt_and_capture(["run"], expect_pass=False) @@ -45,7 +52,14 @@ def models(self) -> str: "input_model.sql": microbatch_input_sql, } - @mock.patch.dict(os.environ, {"DBT_EXPERIMENTAL_MICROBATCH": "True"}) + @pytest.fixture(scope="class") + def project_config_update(self): + return { + "flags": { + "require_builtin_microbatch_strategy": True, + } + } + def test_execution_failure_no_partition_by(self, project): with patch_microbatch_end_time("2020-01-03 13:57:00"): _, stdout = run_dbt_and_capture(["run"], expect_pass=False)