From d167fe1b52751b9b8795e107d2012791bdd2c4f0 Mon Sep 17 00:00:00 2001 From: kleph Date: Tue, 3 Mar 2020 00:29:50 +0100 Subject: [PATCH] [tests] Test parameters passed in URL Fixes #7 --- tests/test_beer.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_beer.py b/tests/test_beer.py index 279dcf7..4ae8827 100644 --- a/tests/test_beer.py +++ b/tests/test_beer.py @@ -21,3 +21,16 @@ def test_slash(client): response = client.get('/') assert response.status_code == 200 assert b'beer' in response.data + +def test_parameters(client): + """Test wiwth no param""" + + hours = '18' + minutes = '30' + response = client.get('/'+hours) + assert response.status_code == 200 + assert b'beer' in response.data + + response = client.get('/'+hours+'/'+minutes) + assert response.status_code == 200 + assert b'beer' in response.data