Skip to content

Commit

Permalink
Use appropriate primary entity name in test YAML
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyholcomb committed Jan 26, 2024
1 parent 4c9669f commit fc78da5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions metricflow/test/query/test_query_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
type: categorical
expr: country
primary_entity: company
primary_entity: revenue_instance
entities:
- name: user
Expand Down Expand Up @@ -455,7 +455,7 @@ def test_cumulative_metric_wrong_time_dimension_validation() -> None:
with pytest.raises(InvalidQueryException, match="do not include 'metric_time'"):
query_parser.parse_and_validate_query(
metric_names=["revenue_cumulative"],
group_by_names=["company__loaded_at"],
group_by_names=["revenue_instance__loaded_at"],
)


Expand All @@ -468,7 +468,7 @@ def test_cumulative_metric_agg_time_dimension_name_validation() -> None:
[EXAMPLE_PROJECT_CONFIGURATION_YAML_CONFIG_FILE, bookings_yaml_file, revenue_yaml_file, metrics_yaml_file]
)

query_parser.parse_and_validate_query(metric_names=["revenue_cumulative"], group_by_names=["company__ds"])
query_parser.parse_and_validate_query(metric_names=["revenue_cumulative"], group_by_names=["revenue_instance__ds"])


def test_derived_metric_query_parsing() -> None:
Expand Down Expand Up @@ -518,7 +518,7 @@ def test_derived_metric_with_offset_parsing() -> None:
with pytest.raises(InvalidQueryException, match="do not include 'metric_time'"):
query_parser.parse_and_validate_query(
metric_names=["revenue_growth_2_weeks"],
group_by_names=["company__country"],
group_by_names=["revenue_instance__country"],
)

# Query with time dimension
Expand Down

0 comments on commit fc78da5

Please sign in to comment.