Skip to content

Commit

Permalink
test: incremental unit test
Browse files Browse the repository at this point in the history
deleted before due a mistake
  • Loading branch information
devmessias committed Oct 21, 2024
1 parent 75f9bc0 commit 7506176
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/functional/unit_testing/test_unit_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,24 @@ def test_basic(self, project):
assert len(results) == 2


class TestUnitTestIncrementalModelWithVersion:
@pytest.fixture(scope="class")
def models(self):
return {
"my_incremental_model.sql": my_incremental_model_sql,
"events.sql": event_sql,
"schema.yml": my_incremental_model_versioned_yml + test_my_model_incremental_yml_basic,
}

def test_basic(self, project):
results = run_dbt(["run"])
assert len(results) == 2

# Select by model name
results = run_dbt(["test", "--select", "my_incremental_model"], expect_pass=True)
assert len(results) == 2


schema_ref_with_version = """
models:
- name: source
Expand Down

0 comments on commit 7506176

Please sign in to comment.