Skip to content

Commit

Permalink
Town6 is now in h5 tag, simplify strip
Browse files Browse the repository at this point in the history
  • Loading branch information
Tschuppi81 committed Jan 17, 2025
1 parent 61f3268 commit 95abc04
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions tests/onegov/org/test_views_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def test_search_future_events_are_sorted_by_occurrence_date(client_with_es):
for current_client in (client, member, anom):
results = current_client.get('/search?q=Concert')
# Expect ordered by occurrence date, for all search results of 'Event'
assert [a.text.rstrip(' \n') for a in
assert [a.text.strip() for a in
results.pyquery('li.search-result-events a')] == [
'Not sorted Concert', 'First Concert', 'Second Concert',
'Third Concert', 'Forth Concert'
Expand All @@ -436,9 +436,9 @@ def test_search_future_events_are_sorted_by_occurrence_date(client_with_es):
# postgres
for current_client in (client, member, anom):
results = current_client.get('/search-postgres?q=Concert')
# Expect future events ordered by occurrence date, fare future first.
# Expect future events ordered by occurrence date, far future first.
# Past events are not sorted by occurrence date.
assert [a.text.rstrip(' \n') for a in
assert [a.text.strip() for a in
results.pyquery('li.search-result-events a')] == [
'Forth Concert', 'Third Concert', 'Second Concert',
'First Concert', 'Not sorted Concert'
Expand Down
10 changes: 5 additions & 5 deletions tests/onegov/town6/test_views_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,19 +428,19 @@ def test_search_future_events_are_sorted_by_occurrence_date(client_with_es):
for current_client in (client, member, anom):
results = current_client.get('/search?q=Concert')
# Expect ordered by occurrence date, for all search results of 'Event'
assert [a.text.rstrip(' \n') for a in
results.pyquery('li.search-result-events a')] == [
assert [t.text.strip() for t in
results.pyquery('li.search-result-events a h5')] == [
'Not sorted Concert', 'First Concert', 'Second Concert',
'Third Concert', 'Forth Concert'
]

# postgres
for current_client in (client, member, anom):
results = current_client.get('/search-postgres?q=Concert')
# Expect future events ordered by occurrence date, fare future first.
# Expect future events ordered by occurrence date, far future first.
# Past events are not sorted by occurrence date.
assert [a.text.rstrip(' \n') for a in
results.pyquery('li.search-result-events a')] == [
assert [t.text.strip() for t in
results.pyquery('li.search-result-events a h5')] == [
'Forth Concert', 'Third Concert', 'Second Concert',
'First Concert', 'Not sorted Concert'
]

0 comments on commit 95abc04

Please sign in to comment.