Updated tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import pytest
|
||||
from web import app
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def client():
|
||||
app.app.config['TESTING'] = True
|
||||
@@ -12,4 +11,15 @@ def client():
|
||||
def test_root_page(client):
|
||||
|
||||
rv = client.get('/')
|
||||
assert b'Hello World!' in rv.data
|
||||
assert rv.status_code == 200
|
||||
assert b'Please enter your first name and initial' in rv.data
|
||||
|
||||
def test_generate_first(client):
|
||||
rv2 = client.post('/generate', data=dict(name='tester'), follow_redirects=True)
|
||||
assert rv2.status_code == 200
|
||||
assert b'Please mark all of your bottlecaps with the following identifier: <strong>A' in rv2.data
|
||||
|
||||
def test_generate_second(client):
|
||||
rv = client.post('/generate', data=dict(name='tester'), follow_redirects=True)
|
||||
assert rv.status_code == 200
|
||||
assert b'Please mark all of your bottlecaps with the following identifier: <strong>B' in rv.data
|
||||
Reference in New Issue
Block a user