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
This commit is contained in:
24
tests/test_health.py
Normal file
24
tests/test_health.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""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
|
||||
Reference in New Issue
Block a user