#NEWLINE# def test_meta_add( self ) : #NEWLINE# #INDENT# self . CANEngine = CANSploit ( ) #NEWLINE# self . CANEngine . load_config ( 'tests/test_5.py' ) #NEWLINE# self . CANEngine . start_loop ( ) #NEWLINE# time . sleep ( 1 ) #NEWLINE# self . CANEngine . call_module ( 0 , 'r 0-9' ) #NEWLINE# time . sleep ( 2 ) #NEWLINE# mod_stat = 1 #NEWLINE# self . CANEngine . call_module ( mod_stat , 'i 0x708 ,.*, TEST UDS' ) #NEWLINE# self . CANEngine . call_module ( mod_stat , 'i 0x2bc , 0f410d00 , TEST 700' ) #NEWLINE# self . CANEngine . call_module ( mod_stat , 'i 1803 , 2f............44 , TEST 1803' ) #NEWLINE# self . CANEngine . call_module ( mod_stat , 'i 1801 , 036f , TEST 1801' ) #NEWLINE# self . CANEngine . call_module ( mod_stat , 'z tests/meta.txt' ) #NEWLINE# ret = self . CANEngine . call_module ( mod_stat , 'p' ) #NEWLINE# print ( ret ) #NEWLINE# idx = ret . find ( 'TEST UDS' ) #NEWLINE# self . assertTrue ( ( 0 < idx ) , "Comment 'TEST UDS' should be found 1 times" ) #NEWLINE# idx2 = ret . find ( 'TEST UDS' , ( self + 8 ) ) #NEWLINE# self . assertTrue ( ( 0 < idx2 ) , "Comment 'TEST UDS' should be found 2 times" ) #NEWLINE# self . assertTrue ( ( 0 < ret . find ( 'TEST 700' ) ) , "Comment 'TEST 700' should be found 1 times" ) #NEWLINE# self . assertTrue ( ( 0 < ret . find ( 'TEST 1803' ) ) , "Comment 'TEST 1803' should be found 1 times" ) #NEWLINE# self . assertFalse ( ( 0 < ret . find ( 'TEST 1801' ) ) , "Comment 'TEST 1801' should NOT be found 1 times" )