@@ -178,6 +178,19 @@ def application(znp_server):
178178 ],
179179 )
180180
181+ # Reply to the initialization NVID writes
182+ for nvid in [
183+ NwkNvIds .CONCENTRATOR_ENABLE ,
184+ NwkNvIds .CONCENTRATOR_DISCOVERY ,
185+ NwkNvIds .CONCENTRATOR_RC ,
186+ NwkNvIds .SRC_RTG_EXPIRY_TIME ,
187+ NwkNvIds .NWK_CHILD_AGE_ENABLE ,
188+ ]:
189+ znp_server .reply_to (
190+ request = c .SysCommands .OSALNVWrite .Req (Id = nvid , Offset = 0 , partial = True ),
191+ responses = [c .SysCommands .OSALNVWrite .Rsp (Status = t .Status .Success )],
192+ )
193+
181194 return app , znp_server
182195
183196
@@ -206,7 +219,7 @@ def register_endpoint(request):
206219 assert len (endpoints ) == 5
207220
208221
209- @pytest_mark_asyncio_timeout (seconds = 2 )
222+ @pytest_mark_asyncio_timeout (seconds = 3 )
210223async def test_permit_join (application ):
211224 app , znp_server = application
212225
@@ -241,7 +254,7 @@ async def test_permit_join(application):
241254 await asyncio .gather (data_req_sent , permit_join_sent )
242255
243256
244- @pytest_mark_asyncio_timeout (seconds = 2 )
257+ @pytest_mark_asyncio_timeout (seconds = 3 )
245258async def test_permit_join_failure (application ):
246259 app , znp_server = application
247260
@@ -278,7 +291,7 @@ async def test_permit_join_failure(application):
278291 await asyncio .gather (data_req_sent , permit_join_sent )
279292
280293
281- @pytest_mark_asyncio_timeout ()
294+ @pytest_mark_asyncio_timeout (seconds = 3 )
282295async def test_on_zdo_relays_message_callback (application , mocker ):
283296 app , znp_server = application
284297 await app .startup (auto_form = False )
@@ -292,7 +305,7 @@ async def test_on_zdo_relays_message_callback(application, mocker):
292305 assert device .relays == [0x5678 , 0xABCD ]
293306
294307
295- @pytest_mark_asyncio_timeout ()
308+ @pytest_mark_asyncio_timeout (seconds = 3 )
296309async def test_on_zdo_device_announce (application , mocker ):
297310 app , znp_server = application
298311 await app .startup (auto_form = False )
@@ -310,7 +323,7 @@ async def test_on_zdo_device_announce(application, mocker):
310323 app .handle_join .assert_called_once_with (nwk = nwk , ieee = ieee , parent_nwk = 0 )
311324
312325
313- @pytest_mark_asyncio_timeout ()
326+ @pytest_mark_asyncio_timeout (seconds = 3 )
314327async def test_on_zdo_device_join (application , mocker ):
315328 app , znp_server = application
316329 await app .startup (auto_form = False )
@@ -326,7 +339,7 @@ async def test_on_zdo_device_join(application, mocker):
326339 app .handle_join .assert_called_once_with (nwk = nwk , ieee = ieee , parent_nwk = 0x0001 )
327340
328341
329- @pytest_mark_asyncio_timeout ()
342+ @pytest_mark_asyncio_timeout (seconds = 3 )
330343async def test_on_zdo_device_leave_callback (application , mocker ):
331344 app , znp_server = application
332345 await app .startup (auto_form = False )
@@ -344,7 +357,7 @@ async def test_on_zdo_device_leave_callback(application, mocker):
344357 app .handle_leave .assert_called_once_with (nwk = nwk , ieee = ieee )
345358
346359
347- @pytest_mark_asyncio_timeout ()
360+ @pytest_mark_asyncio_timeout (seconds = 3 )
348361async def test_on_af_message_callback (application , mocker ):
349362 app , znp_server = application
350363 await app .startup (auto_form = False )
@@ -390,7 +403,7 @@ async def test_on_af_message_callback(application, mocker):
390403 assert app .handle_message .call_count == 0
391404
392405
393- @pytest_mark_asyncio_timeout ()
406+ @pytest_mark_asyncio_timeout (seconds = 3 )
394407async def test_probe (pingable_serial_port ): # noqa: F811
395408 assert not (
396409 await ControllerApplication .probe (
@@ -467,7 +480,7 @@ async def fixed_uart_connect(config, api):
467480 assert app ._config [conf .CONF_DEVICE ][conf .CONF_DEVICE_PATH ] == AUTO_DETECTED_PORT
468481
469482
470- @pytest_mark_asyncio_timeout ()
483+ @pytest_mark_asyncio_timeout (seconds = 3 )
471484async def test_close (mocker , application ):
472485 app , znp_server = application
473486 app .connection_lost = mocker .MagicMock (wraps = app .connection_lost )
@@ -478,7 +491,7 @@ async def test_close(mocker, application):
478491 app .connection_lost .assert_called_once_with (None )
479492
480493
481- @pytest_mark_asyncio_timeout ()
494+ @pytest_mark_asyncio_timeout (seconds = 3 )
482495async def test_shutdown (mocker , application ):
483496 app , znp_server = application
484497
@@ -493,7 +506,7 @@ async def test_shutdown(mocker, application):
493506 app ._znp .close .assert_called_once_with ()
494507
495508
496- @pytest_mark_asyncio_timeout (seconds = 2 )
509+ @pytest_mark_asyncio_timeout (seconds = 3 )
497510async def test_zdo_request_interception (application , mocker ):
498511 app , znp_server = application
499512 await app .startup (auto_form = False )
@@ -587,7 +600,7 @@ async def test_zigpy_request(application, mocker):
587600 await data_req
588601
589602
590- @pytest_mark_asyncio_timeout (seconds = 2 )
603+ @pytest_mark_asyncio_timeout (seconds = 3 )
591604@pytest .mark .parametrize (
592605 "use_ieee,dev_addr" ,
593606 [
@@ -616,7 +629,7 @@ async def test_request_use_ieee(application, mocker, use_ieee, dev_addr):
616629 assert send_req .mock_calls [0 ][2 ]["dst_addr" ] == dev_addr
617630
618631
619- @pytest_mark_asyncio_timeout ()
632+ @pytest_mark_asyncio_timeout (seconds = 3 )
620633async def test_update_network_noop (mocker , application ):
621634 app , znp_server = application
622635
0 commit comments