#NEWLINE# def test_stat( self ) : #NEWLINE# #INDENT# self . CANEngine = CANSploit ( ) #NEWLINE# self . CANEngine . load_config ( 'tests/test_1.conf' ) #NEWLINE# self . CANEngine . edit_module ( 1 , { #NEWLINE# #INDENT# 'pipe' : 2 , #NEWLINE# #UNINDENT# } ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . start_loop ( ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 4:4:11223344' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 4:4:11223344' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 4:8:1122334411111111' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 1:4:11223344' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 455678:8:1122334411223344' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 4:4:1122334455' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# index = 1 #NEWLINE# ret = self . CANEngine . call_module ( 1 , 'p' ) #NEWLINE# print ( ret ) #NEWLINE# _bodyList = self . CANEngine . _enabledList [ index ] [ 1 ] . _bodyList #NEWLINE# self . assertTrue ( ( 4 in _bodyList ) , 'We should be able to find ID 4' ) #NEWLINE# self . assertTrue ( ( 455678 in _bodyList ) , 'We should be able to find ID 455678' ) #NEWLINE# self . assertFalse ( ( 2 in _bodyList ) , 'We should not be able to find ID 2' ) #NEWLINE# self . assertFalse ( ( 0 in _bodyList ) , 'We should not be able to find ID 0' ) #NEWLINE# self . CANEngine . call_module ( 1 , 'c' ) #NEWLINE# self . CANEngine . call_module ( 0 , 't 2:8:1122334411223344' ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 1 , 'p' ) #NEWLINE# _bodyList = self . CANEngine . _enabledList [ index ] [ 1 ] . _bodyList #NEWLINE# self . assertFalse ( ( 4 in _bodyList ) , 'We should not be able to find ID 4' ) #NEWLINE# self . assertFalse ( ( 455678 in _bodyList ) , 'We should not be able to find ID 455678' ) #NEWLINE# self . assertTrue ( ( 2 in _bodyList ) , 'We should be able to find ID 2' )