refactored code to place the booking specific actions inside a gestion-sports element
This commit is contained in:
parent
1ec148e866
commit
552db2aa8a
3 changed files with 11 additions and 12 deletions
|
@ -3,8 +3,7 @@ from unittest.mock import patch
|
|||
import pendulum
|
||||
import pytest
|
||||
from aioresponses import aioresponses
|
||||
from gestion_sports import gestion_sports_operations
|
||||
from gestion_sports.gestion_sports_operations import GestionSportsOperations
|
||||
from gestion_sports.gestion_sports_platform import GestionSportsPlatform
|
||||
from models import BookingFilter, Club, User
|
||||
|
||||
from tests import fixtures, utils
|
||||
|
@ -49,7 +48,7 @@ async def test_booking(
|
|||
a_booking_success_response,
|
||||
)
|
||||
|
||||
async with GestionSportsOperations(a_club) as gs_operations:
|
||||
async with GestionSportsPlatform(a_club) as gs_operations:
|
||||
court_booked = await gs_operations.book(a_user, a_booking_filter)
|
||||
assert court_booked == a_club.courts_ids[1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue