From 813b7849fe65be24b29b9ba01a7cb2726d68fb2e Mon Sep 17 00:00:00 2001 From: yann Date: Wed, 2 Jul 2025 17:27:06 +0200 Subject: [PATCH] test Ok on soup --- tests/test_purchase.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/test_purchase.py b/tests/test_purchase.py index 15b0926..350b7a4 100644 --- a/tests/test_purchase.py +++ b/tests/test_purchase.py @@ -3,11 +3,9 @@ from flask import session def test_should_not_when_try_more_points_than_available(client): - data = {"competition": "Spring Festival", "club": "Iron Temple", "places": "5"} - - # response = client.post('/book/Spring%20Festival/Iron%20Temple', data=data) + data = {"competition": "Spring Festival", "club": "Iron Temple", "places": "6"} response = client.post('/purchasePlaces', data=data) - # print(BeautifulSoup(response.data, "html.parser")) - print(session) - #assert "_flashes" in session - #assert session["_flashes"] == [("message", "You don't have enough points")] + soup = BeautifulSoup(response.data, "html.parser") + print(soup.li.text) + assert "You don't have enough points" == soup.li.text +