Remove the integration's database, migrations, DAOs and business modules (#172)

This commit was merged in pull request #172.
This commit is contained in:
2026-09-23 09:11:29 -04:00
parent 2c4113ed61
commit a3f2adcf43
64 changed files with 1394 additions and 5635 deletions
+5 -15
View File
@@ -156,23 +156,13 @@ def test_no_hardcoded_domain_or_db_filename_in_new_modules() -> None:
f"Found hard-coded database filename in {py_file.name}:{node.lineno}"
)
async def test_flow_persists_flow_user_as_initial_admin(hass, make_flow) -> None:
"""The HA user completing the flow lands in entry data as the
initial admin copy: entry.context is not persisted by real HA, so
the durable record must carry the owner."""
from custom_components.nestquest.const import CONF_ADMIN_USER_IDS
flow = make_flow(hass)
flow.context = {"user_id": "ha-owner"}
result = await flow.async_step_user({})
assert result["type"] == "create_entry"
assert result["data"] == {CONF_ADMIN_USER_IDS: ["ha-owner"]}
async def test_flow_without_context_user_keeps_data_untouched(
hass, make_flow
) -> None:
"""A submit with user input stores it as-is; no admin copy is
invented (the allowlist lives in the API service's own store since
the DB removal)."""
flow = make_flow(hass)
result = await flow.async_step_user({"horizon_days": 7})
result = await flow.async_step_user({"update_interval": 60})
assert result["type"] == "create_entry"
assert result["data"] == {"horizon_days": 7}
assert result["data"] == {"update_interval": 60}