Choose a user with booking availability among many
This commit is contained in:
parent
a8322d6be0
commit
559c3b6d69
18 changed files with 1810 additions and 147 deletions
|
@ -8,10 +8,15 @@ from pendulum import Time
|
|||
|
||||
from resa_padel import booking
|
||||
from tests import fixtures, utils
|
||||
from tests.fixtures import a_booking_failure_response, a_booking_success_response
|
||||
from tests.fixtures import (
|
||||
a_booking_failure_response,
|
||||
a_booking_success_response,
|
||||
mes_resas_html,
|
||||
)
|
||||
|
||||
login = "user"
|
||||
password = "password"
|
||||
available_credentials = login + ":" + password + ",some_user:some_password"
|
||||
club_id = "88"
|
||||
court_id = "11"
|
||||
paris_tz = "Europe/Paris"
|
||||
|
@ -31,11 +36,15 @@ datetime_to_book = (
|
|||
"COURT_IDS": "7,8,10",
|
||||
"SPORT_ID": "217",
|
||||
"DATE_TIME": datetime_to_book.isoformat(),
|
||||
"AVAILABLE_USERS_CREDENTIALS": available_credentials,
|
||||
},
|
||||
clear=True,
|
||||
)
|
||||
def test_main(
|
||||
mock_now, a_booking_success_response: str, a_booking_failure_response: str
|
||||
mock_now,
|
||||
a_booking_success_response: str,
|
||||
a_booking_failure_response: str,
|
||||
mes_resas_html: str,
|
||||
):
|
||||
"""
|
||||
Test the main function to book a court
|
||||
|
@ -61,6 +70,7 @@ def test_main(
|
|||
fixtures.url,
|
||||
a_booking_failure_response,
|
||||
a_booking_success_response,
|
||||
mes_resas_html,
|
||||
)
|
||||
|
||||
court_booked = booking.main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue