unit-test2 #10
2 changed files with 14 additions and 0 deletions
|
@ -4,6 +4,7 @@ else
|
||||||
TEST_URL='http://staging.beer.k3s.kleph.eu'
|
TEST_URL='http://staging.beer.k3s.kleph.eu'
|
||||||
fi
|
fi
|
||||||
echo "testing URL: ${TEST_URL}"
|
echo "testing URL: ${TEST_URL}"
|
||||||
|
|
||||||
CURL_OPTS='-s'
|
CURL_OPTS='-s'
|
||||||
# default
|
# default
|
||||||
curl ${CURL_OPTS} ${TEST_URL} | grep -q 'setHours( 17, 0);'
|
curl ${CURL_OPTS} ${TEST_URL} | grep -q 'setHours( 17, 0);'
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue