refactor dir, added integration test for feature
This commit is contained in:
12
tests/unit_tests/test_update.py
Normal file
12
tests/unit_tests/test_update.py
Normal file
@@ -0,0 +1,12 @@
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user