@@ -344,7 +344,6 @@ async def test_msg_properties(self) -> None:
344344 async def test_stick_connect_without_port (self ) -> None :
345345 """Test connecting to stick without port config."""
346346 stick = pw_stick .Stick ()
347- assert stick .accept_join_request is None
348347 assert stick .nodes == {}
349348 assert stick .joined_nodes is None
350349 with pytest .raises (pw_exceptions .StickError ):
@@ -466,10 +465,6 @@ async def test_stick_connect(self, monkeypatch: pytest.MonkeyPatch) -> None:
466465 assert not stick .network_discovered
467466 assert stick .network_state
468467 assert stick .network_id == 17185
469- assert stick .accept_join_request is None
470- # test failing of join requests without active discovery
471- with pytest .raises (pw_exceptions .StickError ):
472- await stick .set_accept_join_request (True )
473468 unsub_connect ()
474469 await stick .disconnect ()
475470 assert not stick .network_state
@@ -651,36 +646,36 @@ async def node_join(self, event: pw_api.NodeEvent, mac: str) -> None: # type: i
651646 )
652647 )
653648
654- @pytest .mark .asyncio
655- async def test_stick_node_join_subscription (
656- self , monkeypatch : pytest .MonkeyPatch
657- ) -> None :
658- """Testing "new_node" subscription."""
659- mock_serial = MockSerial (None )
660- monkeypatch .setattr (
661- pw_connection_manager ,
662- "create_serial_connection" ,
663- mock_serial .mock_connection ,
664- )
665- monkeypatch .setattr (pw_sender , "STICK_TIME_OUT" , 0.1 )
666- monkeypatch .setattr (pw_requests , "NODE_TIME_OUT" , 0.5 )
667- stick = pw_stick .Stick ("test_port" , cache_enabled = False )
668- await stick .connect ()
669- await stick .initialize ()
670- await stick .discover_nodes (load = False )
671- await stick . set_accept_join_request ( True )
672- # self.test_node_join = asyncio.Future()
673- # unusb_join = stick.subscribe_to_node_events(
674- # node_event_callback=self.node_join,
675- # events=(pw_api.NodeEvent.JOIN,),
676- # )
677-
678- # Inject NodeJoinAvailableResponse
679- # mock_serial.inject_message(b"00069999999999999999", b"1254 ") # @bouwew: seq_id is not FFFC!
680- # mac_join_node = await self.test_node_join
681- # assert mac_join_node == "9999999999999999"
682- # unusb_join()
683- await stick .disconnect ()
649+ # @pytest.mark.asyncio
650+ # async def test_stick_node_join_subscription(
651+ # self, monkeypatch: pytest.MonkeyPatch
652+ # ) -> None:
653+ # """Testing "new_node" subscription."""
654+ # mock_serial = MockSerial(None)
655+ # monkeypatch.setattr(
656+ # pw_connection_manager,
657+ # "create_serial_connection",
658+ # mock_serial.mock_connection,
659+ # )
660+ # monkeypatch.setattr(pw_sender, "STICK_TIME_OUT", 0.1)
661+ # monkeypatch.setattr(pw_requests, "NODE_TIME_OUT", 0.5)
662+ # stick = pw_stick.Stick("test_port", cache_enabled=False)
663+ # await stick.connect()
664+ # await stick.initialize()
665+ # await stick.discover_nodes(load=False)
666+
667+ #self.test_node_join = asyncio.Future()
668+ #unusb_join = stick.subscribe_to_node_events(
669+ # node_event_callback=self.node_join,
670+ # events=(pw_api.NodeEvent.JOIN,),
671+ #)
672+
673+ ## Inject NodeJoinAvailableResponse
674+ #mock_serial.inject_message(b"00069999999999999999", b"1253 ") # @bouwew: seq_id is not FFFC!
675+ #mac_join_node = await self.test_node_join
676+ #assert mac_join_node == "9999999999999999"
677+ #unusb_join()
678+ # await stick.disconnect()
684679
685680 @pytest .mark .asyncio
686681 async def test_node_discovery (self , monkeypatch : pytest .MonkeyPatch ) -> None :
@@ -2498,6 +2493,7 @@ async def test_node_discovery_and_load(
24982493 pw_api .NodeFeature .RELAY ,
24992494 pw_api .NodeFeature .RELAY_LOCK ,
25002495 pw_api .NodeFeature .ENERGY ,
2496+ pw_api .NodeFeature .CIRCLEPLUS ,
25012497 pw_api .NodeFeature .POWER ,
25022498 )
25032499 )
0 commit comments