Add Future parity feature blocks
This commit is contained in:
@@ -19,7 +19,7 @@ def test_health_and_backup_roundtrip(tmp_path, monkeypatch) -> None: # type: ig
|
||||
restore = client.post("/v2/backup/restore", json=backup.json())
|
||||
|
||||
assert health.status_code == 200
|
||||
assert health.json()["version"] == "2.0.0-alpha.10"
|
||||
assert health.json()["version"] == "2.0.0-alpha.11"
|
||||
assert backup.status_code == 200
|
||||
assert restore.status_code == 200
|
||||
assert restore.json() == {"status": "restored"}
|
||||
@@ -81,6 +81,28 @@ def test_dashboard_control_and_learning_endpoints(tmp_path, monkeypatch) -> None
|
||||
summary = client.get("/v2/actuators/summary")
|
||||
parity = client.get("/v2/feature-parity")
|
||||
anomalies = client.get("/v2/anomalies")
|
||||
proposal = client.post(
|
||||
"/v2/automations/proposals",
|
||||
json={
|
||||
"name": "Storage light",
|
||||
"trigger_entity_id": "binary_sensor.storage_door",
|
||||
"trigger_state": "on",
|
||||
"actuator_entity_id": "light.storage",
|
||||
"target_state": "on",
|
||||
},
|
||||
)
|
||||
proposal_yaml = client.get("/v2/automations/proposals/proposal-1/yaml")
|
||||
approved = client.post("/v2/automations/proposals/proposal-1/approve")
|
||||
weights = client.post(
|
||||
"/v2/control/light.storage/weights",
|
||||
json={"sensor_weights": {"binary_sensor.storage_door": 1.0}, "note": "door"},
|
||||
)
|
||||
history = client.post(
|
||||
"/v2/history/analyze",
|
||||
json={"entity_ids": ["binary_sensor.storage_door"]},
|
||||
)
|
||||
models = client.post("/v2/models/train", json={"actuator_entity_id": "light.storage"})
|
||||
jobs = client.get("/v2/jobs")
|
||||
dashboard = client.get("/v2/dashboard")
|
||||
|
||||
assert entities.status_code == 200
|
||||
@@ -105,7 +127,22 @@ def test_dashboard_control_and_learning_endpoints(tmp_path, monkeypatch) -> None
|
||||
assert summary.status_code == 200
|
||||
assert summary.json()[0]["actuator_entity_id"] == "light.storage"
|
||||
assert parity.status_code == 200
|
||||
assert "Feedback" in parity.json()["implemented"]
|
||||
assert "Job-Queue" in parity.json()["implemented"]
|
||||
assert anomalies.status_code == 200
|
||||
assert proposal.status_code == 200
|
||||
assert proposal.json()["status"] == "draft"
|
||||
assert proposal_yaml.status_code == 200
|
||||
assert "alias: Storage light" in proposal_yaml.text
|
||||
assert approved.status_code == 200
|
||||
assert approved.json()["status"] == "approved"
|
||||
assert weights.status_code == 200
|
||||
assert weights.json()["sensor_weights"]["binary_sensor.storage_door"] == 1.0
|
||||
assert history.status_code == 200
|
||||
assert history.json()[0]["entity_id"] == "binary_sensor.storage_door"
|
||||
assert models.status_code == 200
|
||||
assert models.json()[0]["actuator_entity_id"] == "light.storage"
|
||||
assert jobs.status_code == 200
|
||||
assert jobs.json()
|
||||
assert dashboard.status_code == 200
|
||||
assert dashboard.json()["actuator_count"] == 1
|
||||
assert dashboard.json()["automation_proposals"] == 1
|
||||
|
||||
Reference in New Issue
Block a user