All methods are in the right class
This commit is contained in:
parent
0d541e82a5
commit
7f59443b64
12 changed files with 585 additions and 1729 deletions
|
@ -11,6 +11,7 @@ from tests.unit_tests import responses
|
|||
@pytest.mark.asyncio
|
||||
async def test_booking_success(
|
||||
aioresponses,
|
||||
gs_services,
|
||||
connector,
|
||||
club,
|
||||
user,
|
||||
|
@ -21,7 +22,7 @@ async def test_booking_success(
|
|||
aioresponses, connector, booking_success_from_start
|
||||
)
|
||||
|
||||
court_booked = await GestionSportsServices.book(club, user, booking_filter)
|
||||
court_booked = await gs_services.book(club, user, booking_filter)
|
||||
|
||||
assert court_booked.id == 2
|
||||
|
||||
|
@ -45,6 +46,11 @@ async def test_booking_failure(
|
|||
assert court_booked is None
|
||||
|
||||
|
||||
def test_get_booked_court(gs_services, booked_courts_response, sport1):
|
||||
booked_court = gs_services.get_booked_court(booked_courts_response, sport1)
|
||||
assert booked_court.number == 3
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_user_has_available_booking_slots(
|
||||
aioresponses,
|
||||
|
@ -98,22 +104,6 @@ async def test_cancel_booking(
|
|||
await gs_services.cancel_booking(user, club, booking_filter)
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cancel_booking_id(
|
||||
aioresponses,
|
||||
gs_services,
|
||||
connector,
|
||||
user,
|
||||
club,
|
||||
cancellation_success_from_start,
|
||||
):
|
||||
responses.set_full_cancellation_responses(
|
||||
aioresponses, connector, cancellation_success_from_start
|
||||
)
|
||||
|
||||
await gs_services.cancel_booking_id(user, club, 65464)
|
||||
|
||||
|
||||
@patch("pendulum.now")
|
||||
def test_wait_until_booking_time(mock_now, club, user):
|
||||
booking_filter = BookingFilter(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue