18 lines
528 B
Python
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
|