Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peribeir committed Jun 10, 2023
1 parent ffe4196 commit 6592977
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/test_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ def mocked_api(self, event_loop):
"df_stick_version": "2.0"
})
api.async_get_fw_version.return_value = func_get_fw_version
func_get_interfaces = asyncio.Future(loop=event_loop)
func_get_interfaces.set_result({
"interfaces": {
"eth0": {
"address": "b0:1f:81:b1:21:7a",
"carrier": "1",
"speed": "100",
"type": "ethernet",
"duplex": "full",
"enabled": True
}
}
})
api.async_get_interfaces.return_value = func_get_interfaces
func_get_nodename = asyncio.Future(loop=event_loop)
func_get_nodename.set_result({"nodename": "testnodename"})
api.async_get_nodename.return_value = func_get_nodename
Expand All @@ -39,7 +53,7 @@ async def test_build_from_api(self, mocked_api):
hub = await HomePilotHub.async_build_from_api(mocked_api, "-1")
assert hub.api == mocked_api
assert hub.did == "-1"
assert hub.uid == TEST_HOST
assert hub.uid == "b01f81b1217a"
assert hub.device_number == "-1"
assert hub.device_group == "-1"
assert hub.duofern_stick_version == "2.0"
Expand Down

0 comments on commit 6592977

Please sign in to comment.