Update feeling lucky test

pull/1130/head
David Shen 2 months ago
parent 453b72d857
commit 9de34d2681
No known key found for this signature in database
GPG Key ID: DDF1B9C8A9AD8CB3

@ -17,8 +17,15 @@ def test_search(client):
def test_feeling_lucky(client):
rv = client.get(f'/{Endpoint.search}?q=!%20test')
# Bang at beginning of query
rv = client.get(f'/{Endpoint.search}?q=!%20wikipedia')
assert rv._status_code == 303
assert rv.headers.get('Location').startswith('https://www.wikipedia.org')
# Move bang to end of query
rv = client.get(f'/{Endpoint.search}?q=github%20!')
assert rv._status_code == 303
assert rv.headers.get('Location').startswith('https://github.com')
def test_ddg_bang(client):

Loading…
Cancel
Save