Files
Skeen-CRM/tests/test_health.py
root 5740d94295 feat: real ERPNext Healthcare integration + setup tooling
- Replace all mock tools with real ERPNext Healthcare operations
- ERPNextHealthcare class: patients, practitioners, appointments, schedules
- check_availability queries real practitioner schedules from ERPNext
- create_appointment finds/creates patient + validates conflicts + books in ERPNext
- Add /api/v1/config/test endpoint to validate all service connections
- Add scripts/validate_setup.py for CLI validation of Meta/OpenAI/ERPNext/DB
- Add scripts/seed_knowledge.py with full SKEEN catalog (services, products, packages, FAQ)
- Add tests for webhook, health, and WhatsApp client
- Update main.py to include config router
2026-04-29 05:37:22 +00:00

25 lines
663 B
Python

"""Tests for health check endpoints."""
from fastapi.testclient import TestClient
from src.main import create_app
class TestHealth:
def test_health_check(self):
app = create_app()
client = TestClient(app)
response = client.get("/health")
assert response.status_code == 200
data = response.json()
assert data["status"] == "healthy"
assert "timestamp" in data
def test_ready_check(self):
app = create_app()
client = TestClient(app)
response = client.get("/ready")
assert response.status_code == 200
data = response.json()
assert "database" in data