test: scaffold pytest-homeassistant-custom-component test harness

Adds HA component tests covering the localthings integration layer
(previously only the samsung_appliance library was tested):

- pyproject.toml: asyncio_mode=auto for async HA test patterns
- tests/localthings/conftest.py: hass_config_dir override, mock fixtures
  for probe and coordinator session, fridge fixture loader
- test_config_flow.py: first-device form, second-device cred reuse,
  happy path, cannot_connect error, duplicate-device abort (5 tests)
- test_coordinator.py: discovery on first refresh, device_info populated,
  idle interval default, UpdateFailed on persistent poll error (4 tests)
- test_sensor.py: sensors registered, sensor state from coordinator (2 tests)

Total: 70 library + 11 component = 81 tests
This commit is contained in:
Marc Billow committed 2026-06-30 16:34:10 -05:00
1 parent ee779c955b
commit 0bb27a9204
6 files changed
+321

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
[tool.pytest.ini_options]
asyncio_mode = "auto"