created a gestion sports services class that handles the connection while the connector is dedicated to the requests

This commit is contained in:
Stanislas Jouffroy 2024-03-20 23:11:43 +01:00
parent bcd8dc0733
commit e6023e0687
12 changed files with 513 additions and 593 deletions

View 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)