@@ -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
@@ -668,18 +663,18 @@ async def test_stick_node_join_subscription(
668663 await stick .connect ()
669664 await stick .initialize ()
670665 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- # )
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+ )
677672
678673 # 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()
674+ mock_serial .inject_message (b"00069999999999999999" , b"1254" ) # @bouwew: seq_id is not FFFC!
675+ mac_join_node = await self .test_node_join
676+ assert mac_join_node == "9999999999999999"
677+ unusb_join ()
683678 await stick .disconnect ()
684679
685680 @pytest .mark .asyncio
0 commit comments