From b2c524bc3eb5a2123a6a7e2dd785b65c253001ae Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Wed, 20 Apr 2022 14:57:54 -0600 Subject: [PATCH] Update test for bang searches without a query The new behavior for bang searches is to redirect to the proper result site, rather than redirecting to the Whoogle home page. --- test/test_routes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_routes.py b/test/test_routes.py index 817a555..94fcfef 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -47,10 +47,10 @@ def test_ddg_bang(client): assert rv._status_code == 302 assert rv.headers.get('Location').startswith('https://github.com') - # Ensure bang without content doesn't redirect to the result + # Ensure bang without a query still redirects to the result rv = client.get(f'/{Endpoint.search}?q=!gh') assert rv._status_code == 302 - assert not rv.headers.get('Location').startswith('https://github.com') + assert rv.headers.get('Location').startswith('https://github.com') def test_config(client):