Skip to content

Commit 9b41c3e

Browse files
committed
format
1 parent 226fbf0 commit 9b41c3e

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

tests/query_test_cases.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@
3939
"saved_query": "order_metrics",
4040
},
4141
# group by param object
42-
{"metrics": ["order_total"], "group_by": [GroupByParam(name="order_date", grain="month", type=GroupByType.DIMENSION)]},
42+
{
43+
"metrics": ["order_total"],
44+
"group_by": [GroupByParam(name="order_date", grain="month", type=GroupByType.DIMENSION)],
45+
},
4346
# multiple group by param objects
4447
{
4548
"metrics": ["order_total"],

tests/test_models.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,10 @@ def test_validate_query_params_no_query() -> None:
294294

295295

296296
def test_validate_query_params_group_by_param_dimension() -> None:
297-
p: QueryParameters = {"group_by": [GroupByParam(name="a", grain="day", type=GroupByType.DIMENSION)], "order_by": ["a"]}
297+
p: QueryParameters = {
298+
"group_by": [GroupByParam(name="a", grain="day", type=GroupByType.DIMENSION)],
299+
"order_by": ["a"],
300+
}
298301
r = validate_query_parameters(p)
299302
assert isinstance(r, AdhocQueryParametersStrict)
300303
assert r.group_by == [GroupByParam(name="a", grain="day", type=GroupByType.DIMENSION)]
@@ -306,7 +309,11 @@ def test_validate_query_params_group_by_param_entity() -> None:
306309
assert isinstance(r, AdhocQueryParametersStrict)
307310
assert r.group_by == [GroupByParam(name="a", grain="day", type=GroupByType.ENTITY)]
308311

312+
309313
def test_validate_missing_query_params_group_by_param() -> None:
310-
p: QueryParameters = {"group_by": [GroupByParam(name="b", grain="day", type=GroupByType.DIMENSION)], "order_by": ["a"]}
314+
p: QueryParameters = {
315+
"group_by": [GroupByParam(name="b", grain="day", type=GroupByType.DIMENSION)],
316+
"order_by": ["a"],
317+
}
311318
with pytest.raises(ValueError):
312319
validate_query_parameters(p)

0 commit comments

Comments
 (0)