[tests] Test parameters passed in URL
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing

Fixes #7
This commit is contained in:
kleph 2020-03-03 00:29:50 +01:00
parent f5632bffbe
commit ff6c1f586e

View file

@ -21,3 +21,16 @@ def test_slash(client):
response = client.get('/') response = client.get('/')
assert response.status_code == 200 assert response.status_code == 200
assert b'<title>beer</title>' in response.data assert b'<title>beer</title>' 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'<title>beer</title>' in response.data
response = client.get('/'+hours+'/'+minutes)
assert response.status_code == 200
assert b'<title>beer</title>' in response.data