Skip to content

Commit 6c52f8c

Browse files
committed
Add test for snapshot loading
1 parent 4473bc0 commit 6c52f8c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/dbt/test_model.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,18 @@ def test_load_microbatch_with_ref_no_filter(
733733
)
734734

735735

736+
@pytest.mark.slow
737+
def test_load_multiple_snapshots_defined_in_same_file(sushi_test_dbt_context: Context) -> None:
738+
context = sushi_test_dbt_context
739+
assert context.get_model("snapshots.items_snapshot")
740+
assert context.get_model("snapshots.items_check_snapshot")
741+
742+
# Make sure cache works too
743+
context.load()
744+
assert context.get_model("snapshots.items_snapshot")
745+
assert context.get_model("snapshots.items_check_snapshot")
746+
747+
736748
@pytest.mark.slow
737749
def test_dbt_jinja_macro_undefined_variable_error(create_empty_project):
738750
project_dir, model_dir = create_empty_project()

0 commit comments

Comments
 (0)