mirror of
http://88.130.71.182:3000/BlitTech/badoHair_be.git
synced 2026-06-12 23:23:22 +00:00
Fix 2 broken test assertions, add 22 new tests for register flow, booking email resilience, settings, and customers
This commit is contained in:
@@ -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"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user