-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize fixtures and implement a happy path test for semantic_mani…
…fest (#9930)
- Loading branch information
1 parent
8b5884b
commit a70024f
Showing
9 changed files
with
1,061 additions
and
899 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Under the Hood | ||
body: Add a test for semantic manifest and move test fixtures needed for it | ||
time: 2024-04-16T15:00:30.614286-07:00 | ||
custom: | ||
Author: ChenyuLInx | ||
Issue: "9665" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import pytest | ||
from dbt.contracts.graph.semantic_manifest import SemanticManifest | ||
|
||
|
||
# Overwrite the default nods to construct the manifest | ||
@pytest.fixture | ||
def nodes(metricflow_time_spine_model): | ||
return [metricflow_time_spine_model] | ||
|
||
|
||
@pytest.fixture | ||
def semantic_models( | ||
semantic_model, | ||
) -> list: | ||
return [semantic_model] | ||
|
||
|
||
@pytest.fixture | ||
def metrics( | ||
metric, | ||
) -> list: | ||
return [metric] | ||
|
||
|
||
class TestSemanticManifest: | ||
def test_validate(self, manifest): | ||
sm_manifest = SemanticManifest(manifest) | ||
assert sm_manifest.validate() |
Oops, something went wrong.