created a gestion sports services class that handles the connection while the connector is dedicated to the requests
This commit is contained in:
parent
bcd8dc0733
commit
e6023e0687
12 changed files with 513 additions and 593 deletions
20
tests/integration_tests/test_gestion_sports_services.py
Normal file
20
tests/integration_tests/test_gestion_sports_services.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import pytest
|
||||
from gestion_sports_services import GestionSportsServices
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_booking_success(club, user, booking_filter):
|
||||
court_booked = await GestionSportsServices.book(club, user, booking_filter)
|
||||
|
||||
assert court_booked.id is not None
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_user_has_available_slots(club, user):
|
||||
has_slots = await GestionSportsServices.has_user_available_slots(user, club)
|
||||
assert has_slots
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_cancel_booking(club, user, booking_filter):
|
||||
await GestionSportsServices.cancel_booking(user, club, booking_filter)
|
Loading…
Add table
Add a link
Reference in a new issue