Skip to content

Commit

Permalink
Added test assertion for merging meta
Browse files Browse the repository at this point in the history
  • Loading branch information
DevonFulcher committed Nov 12, 2024
1 parent 49f7ce6 commit 1c54b87
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/parsing/test_semantic_model_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,13 @@ def test_semantic_model_element_config_merging() -> None:
type: time
type_params:
time_granularity: day
- name: dim_3
type: time
type_params:
time_granularity: day
config:
meta:
dim_metadata: gfds
entities:
- name: entity_0
type: primary
Expand All @@ -595,7 +602,7 @@ def test_semantic_model_element_config_merging() -> None:
semantic_model = build_result.semantic_manifest.semantic_models[0]
assert semantic_model.config is not None
assert semantic_model.config.meta["sm_metadata"] == "asdf"
assert len(semantic_model.dimensions) == 3
assert len(semantic_model.dimensions) == 4
assert semantic_model.dimensions[0].config is not None
assert semantic_model.dimensions[0].config.meta["sm_metadata"] == "qwer"
assert semantic_model.dimensions[0].config.meta["dim_metadata"] == "fdsa"
Expand All @@ -604,6 +611,9 @@ def test_semantic_model_element_config_merging() -> None:
assert semantic_model.dimensions[1].config.meta["dim_metadata"] == "mlkj"
assert semantic_model.dimensions[2].config is not None
assert semantic_model.dimensions[2].config.meta["sm_metadata"] == "asdf"
assert semantic_model.dimensions[3].config is not None
assert semantic_model.dimensions[3].config.meta["dim_metadata"] == "gfds"
assert semantic_model.dimensions[3].config.meta["sm_metadata"] == "asdf"
assert len(semantic_model.entities) == 1
assert semantic_model.entities[0].config is not None
assert semantic_model.entities[0].config.meta["sm_metadata"] == "hjkl"
Expand Down

0 comments on commit 1c54b87

Please sign in to comment.