Payloads are now built with Jinja templates
This commit is contained in:
parent
ccd019eb4c
commit
badced0a30
12 changed files with 222 additions and 175 deletions
|
@ -3,9 +3,7 @@ import json
|
|||
import pendulum
|
||||
import pytest
|
||||
|
||||
from resa_padel.gestion_sports.gestion_sports_payload_builder import (
|
||||
GestionSportsPayloadBuilder,
|
||||
)
|
||||
from gestion_sports.payload_builders import GestionSportsBookingPayloadBuilder
|
||||
from resa_padel.models import BookingFilter, Club, User
|
||||
|
||||
user = User(login="padel.testing@jouf.fr", password="ridicule", club_id="123")
|
||||
|
@ -38,12 +36,10 @@ booking_success_response = json.dumps(
|
|||
date_format = "%d/%m/%Y"
|
||||
time_format = "%H:%M"
|
||||
booking_payload = (
|
||||
GestionSportsPayloadBuilder()
|
||||
.date(booking_date.date().strftime(date_format))
|
||||
.time(booking_date.time().strftime(time_format))
|
||||
.sport_id(sport_id)
|
||||
GestionSportsBookingPayloadBuilder()
|
||||
.booking_filter(booking_filter)
|
||||
.court_id(courts[0])
|
||||
.build_booking_payload()
|
||||
.build()
|
||||
)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue