Skip to content

Commit

Permalink
Fix up after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
puddly committed Nov 8, 2024
1 parent 314d7cf commit 1dcd392
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions tests/test_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ def _create_app_for_startup(
ezsp_mock.wait_for_stack_status.return_value.__enter__ = AsyncMock(
return_value=t.EmberStatus.NETWORK_UP
)
ezsp_mock.customFrame = AsyncMock(
return_value=[t.EmberStatus.LIBRARY_NOT_PRESENT, b""]
)
ezsp_mock.xncp_get_supported_firmware_features = AsyncMock(
return_value=FirmwareFeatures.NONE
)
Expand Down Expand Up @@ -1827,6 +1830,7 @@ def zigpy_backup() -> zigpy.backups.NetworkBackup:
metadata={
"ezsp": {
"stack_version": 8,
"flow_control": None,
"can_burn_userdata_custom_eui64": True,
"can_rewrite_custom_eui64": True,
}
Expand Down
9 changes: 6 additions & 3 deletions tests/test_ezsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ async def mock_command(command, *args, **kwargs):

api._mock_commands = {}
api._mock_commands["version"] = AsyncMock(return_value=[version, 0, 0])
api._mock_commands["customFrame"] = AsyncMock(
return_value=[t.EmberStatus.LIBRARY_NOT_PRESENT, b""]
)
api._command = AsyncMock(side_effect=mock_command)

return api
Expand Down Expand Up @@ -588,8 +591,8 @@ async def test_write_custom_eui64_rcp(ezsp_f):

@patch.object(EZSP, "version", new_callable=AsyncMock)
@patch.object(EZSP, "reset", new_callable=AsyncMock)
@patch.object(ezsp.EZSP, "get_xncp_features", new_callable=AsyncMock)
async def test_ezsp_init_zigbeed(reset_mock, xncp_mock, version_mock):
@patch.object(EZSP, "get_xncp_features", new_callable=AsyncMock)
async def test_ezsp_init_zigbeed(xncp_mock, reset_mock, version_mock):
"""Test initialize method with a received startup reset frame."""
ezsp = make_ezsp(
config={
Expand All @@ -610,7 +613,7 @@ async def test_ezsp_init_zigbeed(reset_mock, xncp_mock, version_mock):

@patch.object(EZSP, "version", new_callable=AsyncMock)
@patch.object(EZSP, "reset", new_callable=AsyncMock)
@patch.object(ezsp.EZSP, "get_xncp_features", new_callable=AsyncMock)
@patch.object(EZSP, "get_xncp_features", new_callable=AsyncMock)
@patch("bellows.ezsp.NETWORK_COORDINATOR_STARTUP_RESET_WAIT", 0.01)
async def test_ezsp_init_zigbeed_timeout(reset_mock, xncp_mock, version_mock):
"""Test initialize method with a received startup reset frame."""
Expand Down

0 comments on commit 1dcd392

Please sign in to comment.