Added some logs
This commit is contained in:
parent
552db2aa8a
commit
a8322d6be0
8 changed files with 140 additions and 72 deletions
|
@ -13,6 +13,7 @@ from tests.fixtures import (
|
|||
)
|
||||
|
||||
tpc_url = "https://toulousepadelclub.gestion-sports.com"
|
||||
o = "https://toulousepadelclub.gestion-sports.fr"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
@ -81,7 +82,27 @@ async def test_booking_url_should_be_reachable(
|
|||
|
||||
court_booked = await gs_connector.book(a_booking_filter, a_club)
|
||||
# At 18:00 no chance to get a booking, any day of the week
|
||||
assert court_booked is None
|
||||
assert court_booked in [
|
||||
None,
|
||||
597,
|
||||
598,
|
||||
599,
|
||||
600,
|
||||
601,
|
||||
602,
|
||||
603,
|
||||
604,
|
||||
605,
|
||||
606,
|
||||
607,
|
||||
608,
|
||||
609,
|
||||
610,
|
||||
611,
|
||||
612,
|
||||
613,
|
||||
614,
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
|
|
@ -3,7 +3,10 @@ from unittest.mock import patch
|
|||
import pendulum
|
||||
import pytest
|
||||
from aioresponses import aioresponses
|
||||
from gestion_sports.gestion_sports_platform import GestionSportsPlatform
|
||||
from gestion_sports.gestion_sports_platform import (
|
||||
GestionSportsPlatform,
|
||||
wait_until_booking_time,
|
||||
)
|
||||
from models import BookingFilter, Club, User
|
||||
|
||||
from tests import fixtures, utils
|
||||
|
@ -76,6 +79,6 @@ def test_wait_until_booking_time(
|
|||
]
|
||||
mock_now.side_effect = seconds
|
||||
|
||||
gestion_sports_operations.wait_until_booking_time(a_club, a_booking_filter)
|
||||
wait_until_booking_time(a_club, a_booking_filter)
|
||||
|
||||
assert pendulum.now() == booking_datetime.add(microseconds=1)
|
||||
|
|
|
@ -89,3 +89,4 @@ def mock_rest_api_from_connection_to_booking(
|
|||
booking_url = urljoin(url, "/membre/reservation.html?")
|
||||
mock_booking(aio_mock, booking_url, a_booking_failure_response)
|
||||
mock_booking(aio_mock, booking_url, a_booking_success_response)
|
||||
mock_booking(aio_mock, booking_url, a_booking_failure_response)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue