first test on link displayed based on date
This commit is contained in:
@@ -10,7 +10,6 @@ def test_should_status_code_ok(client):
|
||||
def test_should_display_sorry_with_unknown_email(client):
|
||||
email = "test@test.com"
|
||||
response = client.post('/showSummary', data={"email": email})
|
||||
print(session)
|
||||
assert "_flashes" in session
|
||||
assert session["_flashes"] == [("message", "Sorry, that email wasn't found")]
|
||||
|
||||
@@ -18,9 +17,10 @@ def test_should_display_sorry_with_unknown_email(client):
|
||||
def test_shoul_display_page_on_known_email(client):
|
||||
email = "admin@irontemple.com"
|
||||
response = client.post('/showSummary', data={"email": email})
|
||||
print(session)
|
||||
soup = BeautifulSoup(response.data, 'html.parser')
|
||||
assert soup.h2.text == "Welcome, "+email
|
||||
#assert soup.h2.text == "Welcome, "+email
|
||||
welcome = "Welcome, "+email
|
||||
assert welcome in response.data.decode()
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -39,11 +39,10 @@ class TestPlaces:
|
||||
soup = BeautifulSoup(response.data, "html.parser")
|
||||
assert "You already booked 12 places for "+club1['competition'] == soup.li.text
|
||||
|
||||
|
||||
class TestDate:
|
||||
|
||||
def test_should_not_display_book_link_for_past_competitions(self, connect):
|
||||
li = connect.find_all("li")
|
||||
assert not li[0].a
|
||||
assert li[1].a
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user