Skip to content

Commit

Permalink
Update test_incremental_microbatch to use behavior flag instead of en…
Browse files Browse the repository at this point in the history
…vironment variable
  • Loading branch information
QMalcolm committed Oct 1, 2024
1 parent ae0f91c commit ea4596d
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit ea4596d

Please sign in to comment.