mirror of
https://github.com/home-assistant/core.git
synced 2025-11-12 20:40:18 +00:00
Fix Freebox Home alarm & improve platform tests (#103475)
* Fix Freebox Home alarm * Add trigger feature test & fix * FreeboxCallSensor: Add test for missing coverage of new call * Use generator Co-authored-by: Martin Hjelmare <marhje52@gmail.com> * Add test for arm_home feature (questions about the check) * Stay focus on alam tests * can_arm_home ==> if _command_arm_home * Use one liner for supported_features * Add idle state * Fix rebase --------- Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import json
|
||||
|
||||
from homeassistant.components.freebox.router import is_json
|
||||
|
||||
from .const import DATA_LAN_GET_HOSTS_LIST_MODE_BRIDGE, WIFI_GET_GLOBAL_CONFIG
|
||||
from .const import DATA_LAN_GET_HOSTS_LIST_MODE_BRIDGE, DATA_WIFI_GET_GLOBAL_CONFIG
|
||||
|
||||
|
||||
async def test_is_json() -> None:
|
||||
@@ -12,7 +12,7 @@ async def test_is_json() -> None:
|
||||
# Valid JSON values
|
||||
assert is_json("{}")
|
||||
assert is_json('{ "simple":"json" }')
|
||||
assert is_json(json.dumps(WIFI_GET_GLOBAL_CONFIG))
|
||||
assert is_json(json.dumps(DATA_WIFI_GET_GLOBAL_CONFIG))
|
||||
assert is_json(json.dumps(DATA_LAN_GET_HOSTS_LIST_MODE_BRIDGE))
|
||||
|
||||
# Not valid JSON values
|
||||
|
||||
Reference in New Issue
Block a user