@@ -178,6 +178,19 @@ def application(znp_server):
178
178
],
179
179
)
180
180
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
+
181
194
return app , znp_server
182
195
183
196
@@ -206,7 +219,7 @@ def register_endpoint(request):
206
219
assert len (endpoints ) == 5
207
220
208
221
209
- @pytest_mark_asyncio_timeout (seconds = 2 )
222
+ @pytest_mark_asyncio_timeout (seconds = 3 )
210
223
async def test_permit_join (application ):
211
224
app , znp_server = application
212
225
@@ -241,7 +254,7 @@ async def test_permit_join(application):
241
254
await asyncio .gather (data_req_sent , permit_join_sent )
242
255
243
256
244
- @pytest_mark_asyncio_timeout (seconds = 2 )
257
+ @pytest_mark_asyncio_timeout (seconds = 3 )
245
258
async def test_permit_join_failure (application ):
246
259
app , znp_server = application
247
260
@@ -278,7 +291,7 @@ async def test_permit_join_failure(application):
278
291
await asyncio .gather (data_req_sent , permit_join_sent )
279
292
280
293
281
- @pytest_mark_asyncio_timeout ()
294
+ @pytest_mark_asyncio_timeout (seconds = 3 )
282
295
async def test_on_zdo_relays_message_callback (application , mocker ):
283
296
app , znp_server = application
284
297
await app .startup (auto_form = False )
@@ -292,7 +305,7 @@ async def test_on_zdo_relays_message_callback(application, mocker):
292
305
assert device .relays == [0x5678 , 0xABCD ]
293
306
294
307
295
- @pytest_mark_asyncio_timeout ()
308
+ @pytest_mark_asyncio_timeout (seconds = 3 )
296
309
async def test_on_zdo_device_announce (application , mocker ):
297
310
app , znp_server = application
298
311
await app .startup (auto_form = False )
@@ -310,7 +323,7 @@ async def test_on_zdo_device_announce(application, mocker):
310
323
app .handle_join .assert_called_once_with (nwk = nwk , ieee = ieee , parent_nwk = 0 )
311
324
312
325
313
- @pytest_mark_asyncio_timeout ()
326
+ @pytest_mark_asyncio_timeout (seconds = 3 )
314
327
async def test_on_zdo_device_join (application , mocker ):
315
328
app , znp_server = application
316
329
await app .startup (auto_form = False )
@@ -326,7 +339,7 @@ async def test_on_zdo_device_join(application, mocker):
326
339
app .handle_join .assert_called_once_with (nwk = nwk , ieee = ieee , parent_nwk = 0x0001 )
327
340
328
341
329
- @pytest_mark_asyncio_timeout ()
342
+ @pytest_mark_asyncio_timeout (seconds = 3 )
330
343
async def test_on_zdo_device_leave_callback (application , mocker ):
331
344
app , znp_server = application
332
345
await app .startup (auto_form = False )
@@ -344,7 +357,7 @@ async def test_on_zdo_device_leave_callback(application, mocker):
344
357
app .handle_leave .assert_called_once_with (nwk = nwk , ieee = ieee )
345
358
346
359
347
- @pytest_mark_asyncio_timeout ()
360
+ @pytest_mark_asyncio_timeout (seconds = 3 )
348
361
async def test_on_af_message_callback (application , mocker ):
349
362
app , znp_server = application
350
363
await app .startup (auto_form = False )
@@ -390,7 +403,7 @@ async def test_on_af_message_callback(application, mocker):
390
403
assert app .handle_message .call_count == 0
391
404
392
405
393
- @pytest_mark_asyncio_timeout ()
406
+ @pytest_mark_asyncio_timeout (seconds = 3 )
394
407
async def test_probe (pingable_serial_port ): # noqa: F811
395
408
assert not (
396
409
await ControllerApplication .probe (
@@ -467,7 +480,7 @@ async def fixed_uart_connect(config, api):
467
480
assert app ._config [conf .CONF_DEVICE ][conf .CONF_DEVICE_PATH ] == AUTO_DETECTED_PORT
468
481
469
482
470
- @pytest_mark_asyncio_timeout ()
483
+ @pytest_mark_asyncio_timeout (seconds = 3 )
471
484
async def test_close (mocker , application ):
472
485
app , znp_server = application
473
486
app .connection_lost = mocker .MagicMock (wraps = app .connection_lost )
@@ -478,7 +491,7 @@ async def test_close(mocker, application):
478
491
app .connection_lost .assert_called_once_with (None )
479
492
480
493
481
- @pytest_mark_asyncio_timeout ()
494
+ @pytest_mark_asyncio_timeout (seconds = 3 )
482
495
async def test_shutdown (mocker , application ):
483
496
app , znp_server = application
484
497
@@ -493,7 +506,7 @@ async def test_shutdown(mocker, application):
493
506
app ._znp .close .assert_called_once_with ()
494
507
495
508
496
- @pytest_mark_asyncio_timeout (seconds = 2 )
509
+ @pytest_mark_asyncio_timeout (seconds = 3 )
497
510
async def test_zdo_request_interception (application , mocker ):
498
511
app , znp_server = application
499
512
await app .startup (auto_form = False )
@@ -587,7 +600,7 @@ async def test_zigpy_request(application, mocker):
587
600
await data_req
588
601
589
602
590
- @pytest_mark_asyncio_timeout (seconds = 2 )
603
+ @pytest_mark_asyncio_timeout (seconds = 3 )
591
604
@pytest .mark .parametrize (
592
605
"use_ieee,dev_addr" ,
593
606
[
@@ -616,7 +629,7 @@ async def test_request_use_ieee(application, mocker, use_ieee, dev_addr):
616
629
assert send_req .mock_calls [0 ][2 ]["dst_addr" ] == dev_addr
617
630
618
631
619
- @pytest_mark_asyncio_timeout ()
632
+ @pytest_mark_asyncio_timeout (seconds = 3 )
620
633
async def test_update_network_noop (mocker , application ):
621
634
app , znp_server = application
622
635
0 commit comments