Files
sillyhome-next/tests/api/test_automations.py
Otto fa250216be
Some checks failed
quality / test (3.11) (push) Has been cancelled
quality / test (3.13) (push) Has been cancelled
BEHAVIOR-001: learn and predict actuator actions
2026-06-14 10:37:59 +02:00

18 lines
528 B
Python

from fastapi.testclient import TestClient
from app.main import app
def test_automation_api_is_not_exposed() -> None:
with TestClient(app) as client:
response = client.post(
"/v1/automations/proposals",
json={
"alias": "Nicht mehr verfügbar",
"trigger": {"entity_id": "sensor.hall_illuminance", "below": 10},
"action": {"service": "light.turn_on", "entity_id": "light.hall"},
},
)
assert response.status_code == 404