Add test for <op>! bang searches

This commit is contained in:
Ben Busby 2021-10-28 12:37:11 -06:00
parent 1de7846aed
commit 0476a426aa
No known key found for this signature in database
GPG Key ID: 339B7B7EB5333D14

View File

@ -36,6 +36,11 @@ def test_ddg_bang(client):
assert rv._status_code == 302
assert rv.headers.get('Location').startswith('https://www.reddit.com')
# Move '!' to end of the bang
rv = client.get('/search?q=gitlab%20w!')
assert rv._status_code == 302
assert rv.headers.get('Location').startswith('https://en.wikipedia.org')
# Ensure bang is case insensitive
rv = client.get('/search?q=!GH%20whoogle')
assert rv._status_code == 302