Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Aug 9, 2024
1 parent 85144f4 commit 9f61a37
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -1210,10 +1210,10 @@ async def counters_mock():
if nop_success % 2:
raise EzspError
else:
return ([0, 1, 2, 3],)
return {t.EmberCounterType(i): v for i, v in enumerate([0, 1, 2, 3])}
raise asyncio.TimeoutError

app._ezsp.readCounters = AsyncMock(side_effect=counters_mock)
app._ezsp.read_counters = AsyncMock(side_effect=counters_mock)
app._ezsp.nop = AsyncMock(side_effect=EzspError)
app._ezsp.getValue = AsyncMock(
return_value=(t.EzspStatus.ERROR_OUT_OF_MEMORY, b"\x20")
Expand All @@ -1222,7 +1222,7 @@ async def counters_mock():
app._ctrl_event.set()

await app._watchdog_feed()
assert app._ezsp.readCounters.await_count != 0
assert app._ezsp.read_counters.await_count != 0
assert app._ezsp.nop.await_count == 0

cnt = t.EmberCounterType
Expand Down

0 comments on commit 9f61a37

Please sign in to comment.