From 65a05e73b7911d8bd8b76a656d1ede4f42b611d4 Mon Sep 17 00:00:00 2001 From: yann Date: Mon, 7 Jul 2025 11:12:45 +0200 Subject: [PATCH] fixed booking confirmation message --- server.py | 2 +- tests/test_purchase.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 96efd7c..10f30c7 100644 --- a/server.py +++ b/server.py @@ -59,7 +59,7 @@ def purchasePlaces(): competition['numberOfPlaces'] = int(competition['numberOfPlaces']) - placesRequired if not competition['name'] in session: session[competition['name']] = placesRequired - flash('Great-booking complete!') + flash(f"Great ! {placesRequired} places booked for {competition['name']}") else: flash("You don't have enough points") else: diff --git a/tests/test_purchase.py b/tests/test_purchase.py index ae7257c..abf1a39 100644 --- a/tests/test_purchase.py +++ b/tests/test_purchase.py @@ -16,7 +16,7 @@ class TestPoints: club1.update({"places": points-1}) response = client.post('/purchasePlaces', data=club1) soup = BeautifulSoup(response.data, "html.parser") - assert "Great-booking complete!" == soup.li.text + assert f"Great ! "+str(points-1)+" places booked for "+club1['competition'] == soup.li.text class TestPlaces: