@@ -13,11 +13,11 @@ async def test_osal_writes_invalid(connected_znp):
13
13
14
14
# Passing in untyped integers is not allowed
15
15
with pytest .raises (TypeError ):
16
- await znp .nvram .osal_write (nvids .OsalNvIds .STARTUP_OPTION , 0xAB )
16
+ await znp .nvram .osal_write (nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 , 0xAB )
17
17
18
18
# Neither is passing in an empty value
19
19
with pytest .raises (ValueError ):
20
- await znp .nvram .osal_write (nvids .OsalNvIds .STARTUP_OPTION , b"" )
20
+ await znp .nvram .osal_write (nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 , b"" )
21
21
22
22
# Or a type that serializes to an empty value
23
23
class Empty :
@@ -27,7 +27,7 @@ def serialize(self):
27
27
assert Empty ().serialize () == b""
28
28
29
29
with pytest .raises (ValueError ):
30
- await znp .nvram .osal_write (nvids .OsalNvIds .STARTUP_OPTION , Empty ())
30
+ await znp .nvram .osal_write (nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 , Empty ())
31
31
32
32
33
33
@pytest .mark .parametrize (
@@ -41,7 +41,7 @@ def serialize(self):
41
41
async def test_osal_write_existing (connected_znp , value ):
42
42
znp , znp_server = connected_znp
43
43
44
- nvid = nvids .OsalNvIds .STARTUP_OPTION
44
+ nvid = nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1
45
45
46
46
# The item is one byte long
47
47
length_rsp = znp_server .reply_once_to (
@@ -65,7 +65,7 @@ async def test_osal_write_existing(connected_znp, value):
65
65
async def test_osal_write_same_length (connected_znp ):
66
66
znp , znp_server = connected_znp
67
67
68
- nvid = nvids .OsalNvIds .STARTUP_OPTION
68
+ nvid = nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1
69
69
value = b"\x01 "
70
70
71
71
# The existing item is also one byte long so we will not recreate it
@@ -87,7 +87,7 @@ async def test_osal_write_same_length(connected_znp):
87
87
await write_rsp
88
88
89
89
90
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
90
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
91
91
@pytest .mark .parametrize ("value" , [b"\x01 \x02 " ])
92
92
@pytest .mark .parametrize ("create" , [True , False ])
93
93
async def test_osal_write_wrong_length (connected_znp , nvid , value , create ):
@@ -130,7 +130,7 @@ async def test_osal_write_wrong_length(connected_znp, nvid, value, create):
130
130
assert not write_rsp .done ()
131
131
132
132
133
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
133
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
134
134
@pytest .mark .parametrize ("value" , [b"test" ])
135
135
async def test_osal_write_bad_length (connected_znp , nvid , value ):
136
136
znp , znp_server = connected_znp
@@ -147,7 +147,7 @@ async def test_osal_write_bad_length(connected_znp, nvid, value):
147
147
await length_rsp
148
148
149
149
150
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
150
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
151
151
@pytest .mark .parametrize ("value" , [b"test" ])
152
152
async def test_osal_read_success (connected_znp , nvid , value ):
153
153
znp , znp_server = connected_znp
@@ -169,7 +169,7 @@ async def test_osal_read_success(connected_znp, nvid, value):
169
169
assert result == value
170
170
171
171
172
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
172
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
173
173
@pytest .mark .parametrize ("value" , [b"test" * 62 + b"x" ]) # 248 + 1 bytes, needs two
174
174
async def test_osal_read_long_success (connected_znp , nvid , value ):
175
175
znp , znp_server = connected_znp
@@ -197,7 +197,7 @@ async def test_osal_read_long_success(connected_znp, nvid, value):
197
197
assert result == value
198
198
199
199
200
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
200
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
201
201
async def test_osal_read_failure (connected_znp , nvid ):
202
202
znp , znp_server = connected_znp
203
203
@@ -212,7 +212,7 @@ async def test_osal_read_failure(connected_znp, nvid):
212
212
await length_rsp
213
213
214
214
215
- @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .STARTUP_OPTION ])
215
+ @pytest .mark .parametrize ("nvid" , [nvids .OsalNvIds .HAS_CONFIGURED_ZSTACK1 ])
216
216
async def test_osal_write_nonexistent (connected_znp , nvid ):
217
217
znp , znp_server = connected_znp
218
218
0 commit comments