Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexxIT committed Oct 15, 2023
1 parent a67462f commit e5b58e6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def init(device: dict, config: dict = None) -> (XRegistry, List[XEntity]):
reg.dispatcher_connect(SIGNAL_ADD_ENTITIES, lambda x: entities.extend(x))
entities += reg.setup_devices(devices)

hass = HomeAssistant()
hass = HomeAssistant("")
for entity in entities:
if not isinstance(entity, Entity):
continue
Expand Down
8 changes: 8 additions & 0 deletions tests/test_entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -1588,6 +1588,8 @@ def test_minir4():
],
"addSubDevState": "off",
"addTimeOut": 10,

"key": 0, # added manually
},
"model": "MINIR4",
}
Expand All @@ -1599,6 +1601,12 @@ def test_minir4():
switch: SwitchEntity = next(e for e in entities if e.uid == "detach")
assert switch.state == "on"

action: XRemoteButton = next(e for e in entities if e.uid == "action")
assert action.state == ""

action.internal_update({"key": 0})
assert action.state == "single"


def test_t5():
entities = get_entitites(
Expand Down

0 comments on commit e5b58e6

Please sign in to comment.