File size: 819 Bytes
5f12c93 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | """
Tests de integración para el router de camas.
"""
import pytest
from fastapi.testclient import TestClient
@pytest.mark.skip(reason="Requiere configurar token de test")
def test_get_camas_sin_auth(client: TestClient):
response = client.get("/api/v1/camas")
assert response.status_code == 401
@pytest.mark.skip(reason="Requiere configurar token de test")
def test_crear_cama(client: TestClient):
payload = {
"numero": "101",
"piso": 1,
"sector": "SALA_COMUN",
"tipo": "ESTANDAR",
"hospital_id": "HG-001",
"contraindicaciones_incompatibles": [],
}
response = client.post("/api/v1/camas", json=payload)
assert response.status_code == 201
data = response.json()
assert data["numero"] == "101"
assert data["estado"] == "DISPONIBLE"
|