Skip to content

Commit

Permalink
fix: Correct failing municipality integration test (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre committed Feb 29, 2024
1 parent d55fc65 commit 24e4fae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion integration-tests/src/endpoints/integration_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,16 @@ def _test_filter_by_municipality(
assert (
len(feeds) > 0
), f"Expected at least one feed with municipality '{municipality}', got 0."

lowercase_municipality = municipality.lower()
if validate_location:
for feed in feeds:
municipalities = [
location["municipality"] for location in feed["locations"]
]
is_municipality_valid = [municipality in m for m in municipalities]
is_municipality_valid = [
lowercase_municipality in m.lower() for m in municipalities
]
assert any(is_municipality_valid), (
f"Expected all feeds to have municipality '{municipality}', but found municipalities "
f"'{municipalities}'"
Expand Down

0 comments on commit 24e4fae

Please sign in to comment.