@@ -628,43 +628,6 @@ async def test_aps_data_request_relays(relays, api, mock_command_rsp):
628628 assert "has non-trailing optional argument" in str (exc .value )
629629
630630
631- @patch (
632- "zigpy_deconz.api.REQUEST_RETRY_DELAYS" ,
633- [None if v is None else 0 for v in deconz_api .REQUEST_RETRY_DELAYS ],
634- )
635- async def test_aps_data_request_retries_busy (api , mock_command_rsp ):
636- await api .connect ()
637-
638- mock_rsp = mock_command_rsp (
639- command_id = deconz_api .CommandId .aps_data_request ,
640- params = {},
641- rsp = {
642- "status" : deconz_api .Status .BUSY ,
643- "frame_length" : t .uint16_t (9 ),
644- "payload_length" : t .uint16_t (2 ),
645- "device_state" : deconz_api .DeviceState (
646- network_state = deconz_api .NetworkState2 .CONNECTED ,
647- device_state = (
648- deconz_api .DeviceStateFlags .APSDE_DATA_REQUEST_FREE_SLOTS_AVAILABLE
649- ),
650- ),
651- "request_id" : t .uint8_t (0x00 ),
652- },
653- )
654-
655- with pytest .raises (deconz_api .CommandError ):
656- await api .aps_data_request (
657- req_id = 0x00 ,
658- dst_addr_ep = t .DeconzAddressEndpoint .deserialize (b"\x02 \xaa \x55 \x01 " )[0 ],
659- profile = 0x0104 ,
660- cluster = 0x0007 ,
661- src_ep = 1 ,
662- aps_payload = b"aps payload" ,
663- )
664-
665- assert len (mock_rsp .mock_calls ) == 4
666-
667-
668631async def test_aps_data_request_retries_failure (api , mock_command_rsp ):
669632 await api .connect ()
670633
0 commit comments