@@ -36,12 +36,12 @@ def tearDown(self) -> None:
3636
3737 def test_bus_creation (self ) -> None :
3838 self .assertIsInstance (self .bus , neousys .NeousysBus )
39- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Setup .called )
40- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Start .called )
41- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_RegisterReceived .called )
42- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_RegisterStatus .called )
43- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Send .not_called )
44- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Stop .not_called )
39+ neousys .NEOUSYS_CANLIB .CAN_Setup .assert_called ( )
40+ neousys .NEOUSYS_CANLIB .CAN_Start .assert_called ( )
41+ neousys .NEOUSYS_CANLIB .CAN_RegisterReceived .assert_called ( )
42+ neousys .NEOUSYS_CANLIB .CAN_RegisterStatus .assert_called ( )
43+ neousys .NEOUSYS_CANLIB .CAN_Send .assert_not_called ( )
44+ neousys .NEOUSYS_CANLIB .CAN_Stop .assert_not_called ( )
4545
4646 CAN_Start_args = (
4747 can .interfaces .neousys .neousys .NEOUSYS_CANLIB .CAN_Setup .call_args [0 ]
@@ -95,11 +95,11 @@ def test_send(self) -> None:
9595 arbitration_id = 0x01 , data = [1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 ], is_extended_id = False
9696 )
9797 self .bus .send (msg )
98- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Send .called )
98+ neousys .NEOUSYS_CANLIB .CAN_Send .assert_called ( )
9999
100100 def test_shutdown (self ) -> None :
101101 self .bus .shutdown ()
102- self . assertTrue ( neousys .NEOUSYS_CANLIB .CAN_Stop .called )
102+ neousys .NEOUSYS_CANLIB .CAN_Stop .assert_called ( )
103103
104104
105105if __name__ == "__main__" :
0 commit comments