Fix 2 broken test assertions, add 22 new tests for register flow, booking email resilience, settings, and customers

This commit is contained in:
belviskhoremk
2026-05-21 00:12:28 +00:00
parent cccb6ded1d
commit 31a33593e1
6 changed files with 335 additions and 11 deletions

View File

@@ -25,10 +25,9 @@ async def test_get_slots_missing_date_param(anon_client):
async def test_guest_booking_success(anon_client, mock_db):
mock_db.fetchrow = AsyncMock(side_effect=[
SAMPLE_SLOT, # slot availability check
SAMPLE_BOOKING, # INSERT booking
SAMPLE_SLOT, # slot availability check
SAMPLE_BOOKING, # INSERT booking RETURNING *
])
mock_db.fetchval = AsyncMock(return_value=50.0) # default booking price
r = await anon_client.post("/api/v1/bookings", json={
"slot_id": SLOT_ID,
@@ -40,7 +39,6 @@ async def test_guest_booking_success(anon_client, mock_db):
assert r.status_code == 201
body = r.json()
assert body["success"] is True
assert "client_secret" in body["data"]
assert "booking_id" in body["data"]