Skip to content

Commit

Permalink
Update test based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
georgesittas committed Jun 25, 2024
1 parent 7879b65 commit 15d6cab
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions tests/core/test_snapshot_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2022,13 +2022,24 @@ def test_audit_set_blocking_at_use_site(adapter_mock, make_snapshot):
query="SELECT * FROM test_schema.test_table",
)

model = SqlModel(
name="test_schema.test_table",
kind=FullKind(),
query=parse_one("SELECT a::int FROM tbl"),
audits=[
("always_fail", {"blocking": exp.false()}),
],
@macro()
def blocking_value(evaluator):
return False

model = load_sql_based_model(
parse( # type: ignore
"""
MODEL (
name test_schema.test_table,
kind FULL,
audits (
always_fail (blocking := @blocking_value())
)
);
SELECT a::int FROM tbl
"""
),
)
snapshot = make_snapshot(model, audits={always_failing_audit.name: always_failing_audit})
snapshot.categorize_as(SnapshotChangeCategory.BREAKING)
Expand Down

0 comments on commit 15d6cab

Please sign in to comment.