Skip to content

Commit 120497a

Browse files
committed
passing tests 🎉
1 parent 1dc9803 commit 120497a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/test_filters_jinja2.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,17 +211,19 @@ def test_search_post(
211211
# Parse query from upstream
212212
input_filter_land = input_query.get("filter-lang")
213213
input_filter = input_query.get("filter")
214-
filters = [input_filter, json.loads(filter_template_expr)]
215-
print(f"{filters=}")
214+
filter_exprs = [input_filter, filter_template_expr]
216215
expected_filter_out = cql2.Expr(
217-
" AND ".join(cql2.Expr(f).to_text() for f in filters if f)
216+
" AND ".join(
217+
cql2.Expr(expr.strip() if isinstance(expr, str) else expr).to_text()
218+
for expr in filter_exprs
219+
if expr
220+
)
218221
).to_json()
219222

220223
expected_output_query = {
221224
**input_query,
222225
"filter": expected_filter_out,
223226
}
224-
print(f"{expected_output_query=}")
225227

226228
assert (
227229
output_query == expected_output_query

0 commit comments

Comments
 (0)