added docstring and comments

This commit is contained in:
2025-07-08 16:18:43 +02:00
parent c26fee3fbd
commit 99b1c00200
3 changed files with 45 additions and 7 deletions

13
tests/test_update.py Normal file
View File

@@ -0,0 +1,13 @@
class TestPointsUpdate:
def test_should_not_be_ok_the_second_time(self, connect, client, club2):
'''
this books an amount of points-1 places
then test if 1 points remains displayed on page
'''
points = int(connect.span.text)
club2.update({"places": points-1})
response = client.post('/purchasePlaces', data=club2)
assert f"Great ! {points-1} places booked for {club2['competition']}" in response.data.decode()
print(int(connect.span.text))