SWS-12500-custom-component/tests
SchiZzA 038d2459b9
fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util
- C1: received_data / received_ecowitt_data return 503 (not 500) when the entry is
  mid-reload (runtime_data gone); add_new_sensors / add_new_binary_sensors are
  defensive no-ops in that window too.
- C2/C3: Windy and Pocasi reserve their next send window *before* the await, so
  concurrent webhooks can no longer both pass the rate-limit check and double-send
  (which could falsely trip the auto-disable threshold).
- C5: EcowittBridge.set_add_entities flushes unmapped sensors parsed before the
  platform was ready (aioecowitt fires new_sensor_cb only once per key).
- C6: a forwarder auto-disabling itself from the hot path no longer forces a full
  config-entry reload (update_listener now skips reload for live-read flags
  SENSORS_TO_LOAD / WINDY_ENABLED / POCASI_CZ_ENABLED).
- C7: to_int accepts decimal-formatted integers ("180.0").
- C8: forwarders use dt_util.utcnow() (UTC-aware) instead of naive datetime.now().

Tests updated; 305 passing, 100% coverage; ruff + basedpyright clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 18:32:00 +02:00
..
conftest.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_binary_battery.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_config_flow.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_const.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_data.py test: align suite with v2.0 runtime_data architecture 2026-06-21 12:51:52 +02:00
test_diagnostics.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_ecowitt_bridge.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_health.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
test_init.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_integration_lifecycle.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_pocasi_push.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_received_data.py test: align suite with v2.0 runtime_data architecture 2026-06-21 12:51:52 +02:00
test_received_ecowitt.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_routes.py Make routes method-aware and update related tests 2026-03-04 07:53:26 +01:00
test_routes_more.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_sensor_platform.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_sensors_common.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_sensors_weather.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_sensors_wslink.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_staleness_legacy.py test: reach 100% coverage of custom_components/sws12500 2026-06-21 13:23:34 +02:00
test_strings.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_t9_air_quality.py test: align suite with v2.0 runtime_data architecture 2026-06-21 12:51:52 +02:00
test_translations_cs.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_translations_en.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_utils.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_utils_conv.py fix(security)+i18n: stop health-attribute leak, mask secrets in logs, sync translations 2026-06-21 18:08:34 +02:00
test_utils_more.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_weather_sensor_entity.py test: align suite with v2.0 runtime_data architecture 2026-06-21 12:51:52 +02:00
test_windy_func.py Add health diagnostic sensor and extensive tests for sws12500 2026-02-21 11:29:40 +01:00
test_windy_more.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00
test_windy_push.py fix(correctness): reload-window guards, rate-limit races, ecowitt flush, dt_util 2026-06-21 18:32:00 +02:00