test Ok on soup
This commit is contained in:
parent
9705789809
commit
813b7849fe
@ -3,11 +3,9 @@ from flask import session
|
|||||||
|
|
||||||
|
|
||||||
def test_should_not_when_try_more_points_than_available(client):
|
def test_should_not_when_try_more_points_than_available(client):
|
||||||
data = {"competition": "Spring Festival", "club": "Iron Temple", "places": "5"}
|
data = {"competition": "Spring Festival", "club": "Iron Temple", "places": "6"}
|
||||||
|
|
||||||
# response = client.post('/book/Spring%20Festival/Iron%20Temple', data=data)
|
|
||||||
response = client.post('/purchasePlaces', data=data)
|
response = client.post('/purchasePlaces', data=data)
|
||||||
# print(BeautifulSoup(response.data, "html.parser"))
|
soup = BeautifulSoup(response.data, "html.parser")
|
||||||
print(session)
|
print(soup.li.text)
|
||||||
#assert "_flashes" in session
|
assert "You don't have enough points" == soup.li.text
|
||||||
#assert session["_flashes"] == [("message", "You don't have enough points")]
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user