From b10992f51f19e2dfbc95389112d6f323000b1b3a Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Mon, 27 Sep 2021 19:36:16 -0600 Subject: [PATCH] Add test for case-insensitive bang searches --- test/test_routes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_routes.py b/test/test_routes.py index 12cdda3..b894c75 100644 --- a/test/test_routes.py +++ b/test/test_routes.py @@ -36,6 +36,11 @@ def test_ddg_bang(client): assert rv._status_code == 302 assert rv.headers.get('Location').startswith('https://www.reddit.com') + # Ensure bang is case insensitive + rv = client.get('/search?q=!GH%20whoogle') + assert rv._status_code == 302 + assert rv.headers.get('Location').startswith('https://github.com') + def test_config(client): rv = client.post('/config', data=demo_config)