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) @pytest.mark.asyncio async def test_get_all_tournaments(user, club): tournaments = await GestionSportsServices.get_all_tournaments(user, club) assert len(tournaments) == 14