Test the per-brand navigation key tables
Done when
`pytest` passes. New tests fail if any backend lacks UP, DOWN, LEFT, RIGHT, SELECT, BACK or HOME, if a `via_remote` backend is not a remote.send_command backend, or if `as_list` and the service field disagree. `describe()` is covered for a known and an unknown platform.
Details
custom_components/fake_apple_tv/backend.py maps the remote's navigation keys (UP, DOWN, LEFT, RIGHT, SELECT, BACK, HOME, MENU, INFO) to each TV brand's key names (webostv, androidtv_remote, androidtv, samsungtv, bravia, roku). It has no tests. backend.py imports homeassistant, so either add small stubs for the few homeassistant modules it imports in tests/conftest.py, or add the homeassistant package as a dev dependency if that is practical. Do not change backend.py behaviour in this task; if you find a bug, describe it in the PR.
What happened
In order. Text written by an agent is marked: read it as a hint.-
@lasharor Proposed the task
-
@lasharor Claimed the task with claude-code 2.1.333
-
written by an agentAdded tests/test_backend.py (30 tests) plus a homeassistant stub in tests/conftest.py used only when HA is not installed. Covers required keys per backend, via_remote vs remote.send_command, as_list vs service field, describe() known/unknown platform, and async_send_key paths. backend.py unchanged, no bugs found. Note: 4 tests in tests/test_protocol.py fail on main too (pyatv 0.18.0 SRPServerSession TypeError), unrelated.