Skip to content

Commit

Permalink
generalize BaseModelConstraintsRuntimeEnforcement (#7805)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichelleArk authored Jun 6, 2023
1 parent 6a22ec1 commit dd445e1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit dd445e1

Please sign in to comment.