diff --git a/tests/adapter/dbt/tests/adapter/constraints/test_constraints.py b/tests/adapter/dbt/tests/adapter/constraints/test_constraints.py index 49e78d19a34..de78143aff7 100644 --- a/tests/adapter/dbt/tests/adapter/constraints/test_constraints.py +++ b/tests/adapter/dbt/tests/adapter/constraints/test_constraints.py @@ -228,7 +228,8 @@ def test__constraints_ddl(self, project, expected_sql): ) results = run_dbt(["run", "-s", "+my_model"]) - assert len(results) == 2 + # assert at least my_model was run - additional upstreams may or may not be provided to the test setup via models fixture + assert len(results) >= 1 # grab the sql and replace the model identifier to make it generic for all adapters # the name is not what we're testing here anyways and varies based on materialization @@ -481,7 +482,8 @@ def test__model_constraints_ddl(self, project, expected_sql): ) results = run_dbt(["run", "-s", "+my_model"]) - assert len(results) == 2 + # assert at least my_model was run - additional upstreams may or may not be provided to the test setup via models fixture + assert len(results) >= 1 generated_sql = read_file("target", "run", "test", "models", "my_model.sql") generated_sql_modified = _normalize_whitespace(generated_sql) generated_sql_generic = _find_and_replace(