diff --git a/integration_tests/tests/test_anomaly_test_configuration.py b/integration_tests/tests/test_anomaly_test_configuration.py index 89fcd3291..38d5b25ab 100644 --- a/integration_tests/tests/test_anomaly_test_configuration.py +++ b/integration_tests/tests/test_anomaly_test_configuration.py @@ -32,7 +32,7 @@ class ParamValues(Generic[T]): {"count": 1, "period": "day"}, ), "backfill_days": ParamValues(30, 60, 90), - "seasonality": ParamValues("day_of_week", "hour_of_day", "day_of_week"), + "seasonality": ParamValues("day_of_week", "hour_of_day", "Day_Of_Week"), "event_timestamp_column": ParamValues( "vars.updated_at", "model.updated_at", "test.updated_at" ), @@ -67,7 +67,8 @@ class ParamValues(Generic[T]): def _get_expected_adapted_config(values_type: Literal["vars", "model", "test"]): def get_value(key: str): - return PARAM_VALUES[key].__dict__[values_type] + value = PARAM_VALUES[key].__dict__[values_type] + return value.lower() if key == "seasonality" and value else value days_back_multiplier = ( 7 if get_value("seasonality") in ["day_of_week", "hour_of_week"] else 1 diff --git a/macros/edr/tests/test_configuration/get_seasonality.sql b/macros/edr/tests/test_configuration/get_seasonality.sql index b16161ab5..ac24dccc4 100644 --- a/macros/edr/tests/test_configuration/get_seasonality.sql +++ b/macros/edr/tests/test_configuration/get_seasonality.sql @@ -7,7 +7,7 @@ {%- do elementary.validate_seasonality( seasonality, time_bucket, timestamp_column ) -%} - {%- if seasonality %} {{ return(seasonality) }} {%- endif %} + {%- if seasonality %} {{ return(seasonality | lower) }} {%- endif %} {{ return(none) }} {% endmacro %}