- Initialize project with uv, FastAPI, and libsql-client for Turso persistence - Implement local SQLite fallback (`file:local.db`) for zero-friction development and testing - Create schema and seeder with 9 therapy services from Armonía del Ser flyer - Implement POST /bookings with automatic WhatsApp deep-link generation and SPEI instructions - Implement POST /payments/verify 1-tap admin acknowledgment flow - Add automated test suite with 5 passing tests and verification gates (ruff, pyright, pytest)
23 lines
723 B
Python
23 lines
723 B
Python
from __future__ import annotations
|
|
|
|
|
|
def test_list_seeded_services(client):
|
|
response = client.get("/services")
|
|
assert response.status_code == 200
|
|
services = response.json()
|
|
assert len(services) >= 9
|
|
|
|
slugs = [s["slug"] for s in services]
|
|
assert "circulo-cacao-presencial" in slugs
|
|
assert "atencion-psicologica-individual" in slugs
|
|
assert "constelaciones-familiares-online" in slugs
|
|
|
|
|
|
def test_get_service_by_slug(client):
|
|
response = client.get("/services/circulo-cacao-presencial")
|
|
assert response.status_code == 200
|
|
data = response.json()
|
|
assert data["name"] == "Círculo de Cacao (Presencial)"
|
|
assert data["price_mxn"] == 350
|
|
assert data["service_type"] == "GROUP"
|