testmode_init.py.bak
1 import time 2 import uuid 3 4 import helper_inbox 5 import helper_sql 6 7 # from .tests.samples import sample_inbox_msg_ids, sample_deterministic_addr4 8 sample_deterministic_addr4 = 'BM-2cWzSnwjJ7yRP3nLEWUV5LisTZyREWSzUK' 9 sample_inbox_msg_ids = ['27e644765a3e4b2e973ee7ccf958ea20', '51fc5531-3989-4d69-bbb5-68d64b756f5b', 10 '2c975c515f8b414db5eea60ba57ba455', 'bc1f2d8a-681c-4cc0-9a12-6067c7e1ac24'] 11 12 13 def populate_api_test_data(): 14 '''Adding test records in inbox table''' 15 helper_sql.sql_ready.wait() 16 17 test1 = ( 18 sample_inbox_msg_ids[0], sample_deterministic_addr4, 19 sample_deterministic_addr4, 'Test1 subject', int(time.time()), 20 'Test1 body', 'inbox', 2, 0, uuid.uuid4().bytes 21 ) 22 test2 = ( 23 sample_inbox_msg_ids[1], sample_deterministic_addr4, 24 sample_deterministic_addr4, 'Test2 subject', int(time.time()), 25 'Test2 body', 'inbox', 2, 0, uuid.uuid4().bytes 26 ) 27 test3 = ( 28 sample_inbox_msg_ids[2], sample_deterministic_addr4, 29 sample_deterministic_addr4, 'Test3 subject', int(time.time()), 30 'Test3 body', 'inbox', 2, 0, uuid.uuid4().bytes 31 ) 32 test4 = ( 33 sample_inbox_msg_ids[3], sample_deterministic_addr4, 34 sample_deterministic_addr4, 'Test4 subject', int(time.time()), 35 'Test4 body', 'inbox', 2, 0, uuid.uuid4().bytes 36 ) 37 helper_inbox.insert(test1) 38 helper_inbox.insert(test2) 39 helper_inbox.insert(test3) 40 helper_inbox.insert(test4)