Skip to content

Commit b3d9278

Browse files
committed
re-enable node_details test
1 parent de0bfb8 commit b3d9278

File tree

1 file changed

+36
-33
lines changed

1 file changed

+36
-33
lines changed

tests/test_usb.py

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,15 +2155,15 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
21552155
"1298347650AFBECD", 1, mock_stick_controller, load_callback
21562156
)
21572157
assert not test_scan.cache_enabled
2158-
2159-
# await test_scan.update_node_details(
2160-
# firmware=dt(2011, 6, 27, 8, 55, 44, tzinfo=UTC),
2161-
# hardware="080007",
2162-
# node_type=None,
2163-
# timestamp=None,
2164-
# relay_state=None,
2165-
# logaddress_pointer=None,
2166-
# )
2158+
node_info = pw_api.NodeInfoMessage(
2159+
firmware=dt(2011, 6, 27, 8, 55, 44, tzinfo=UTC),
2160+
hardware="080007",
2161+
node_type=None,
2162+
timestamp=None,
2163+
relay_state=None,
2164+
current_logaddress_pointer=None,
2165+
)
2166+
await test_scan.update_node_details(node_info)
21672167
assert await test_scan.load()
21682168

21692169
# test motion reset timer
@@ -2260,14 +2260,15 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
22602260
test_scan = pw_scan.PlugwiseScan(
22612261
"1298347650AFBECD", 1, mock_stick_controller, load_callback
22622262
)
2263-
# await test_scan.update_node_details(
2264-
# firmware=dt(2011, 6, 27, 8, 55, 44, tzinfo=UTC),
2265-
# hardware="080007",
2266-
# node_type=None,
2267-
# timestamp=None,
2268-
# relay_state=None,
2269-
# logaddress_pointer=None,
2270-
# )
2263+
node_info = pw_api.NodeInfoMessage(
2264+
firmware=dt(2011, 6, 27, 8, 55, 44, tzinfo=UTC),
2265+
hardware="080007",
2266+
node_type=None,
2267+
timestamp=None,
2268+
relay_state=None,
2269+
current_logaddress_pointer=None,
2270+
)
2271+
await test_scan.update_node_details(node_info)
22712272
test_scan.cache_enabled = True
22722273
assert await test_scan.load()
22732274
assert sorted(test_scan.features) == sorted(
@@ -2336,14 +2337,15 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
23362337
pw_api.NodeFeature.PING,
23372338
)
23382339
)
2339-
# await test_switch.update_node_details(
2340-
# firmware=dt(2011, 6, 27, 9, 4, 10, tzinfo=UTC),
2341-
# hardware="070051",
2342-
# node_type=None,
2343-
# timestamp=None,
2344-
# relay_state=None,
2345-
# logaddress_pointer=None,
2346-
# )
2340+
node_info = pw_api.NodeInfoMessage(
2341+
firmware=dt(2011, 6, 27, 9, 4, 10, tzinfo=UTC),
2342+
hardware="070051",
2343+
node_type=None,
2344+
timestamp=None,
2345+
relay_state=None,
2346+
current_logaddress_pointer=None,
2347+
)
2348+
await test_switch.update_node_details(node_info)
23472349
assert await test_switch.load()
23482350

23492351
# Switch specific defaults
@@ -2353,14 +2355,15 @@ async def load_callback(event: pw_api.NodeEvent, mac: str) -> None: # type: ign
23532355
test_switch = pw_switch.PlugwiseSwitch(
23542356
"1298347650AFBECD", 1, mock_stick_controller, load_callback
23552357
)
2356-
# await test_switch.update_node_details(
2357-
# firmware=dt(2011, 6, 27, 9, 4, 10, tzinfo=UTC),
2358-
# hardware="070051",
2359-
# node_type=None,
2360-
# timestamp=None,
2361-
# relay_state=None,
2362-
# logaddress_pointer=None,
2363-
# )
2358+
node_info = pw_api.NodeInfoMessage(
2359+
firmware=dt(2011, 6, 27, 9, 4, 10, tzinfo=UTC),
2360+
hardware="070051",
2361+
node_type=None,
2362+
timestamp=None,
2363+
relay_state=None,
2364+
current_logaddress_pointer=None,
2365+
)
2366+
await test_switch.update_node_details(node_info)
23642367
test_switch.cache_enabled = True
23652368
assert test_switch.cache_enabled is True
23662369
assert await test_switch.load()

0 commit comments

Comments
 (0)