def setup_module(): Auth = [] initdata.set_test_data(env, test_parameter) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['backend_acc'], test_parameter['liveController1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idList) initdata.clearFansInfo(test_parameter['db']) initdata.clearIMInfo(test_parameter['db']) Auth.extend([ test_parameter['backend_token'], test_parameter['backend_nonce'], test_parameter['liveController1_token'], test_parameter['liveController1_nonce'] ]) for i in range(2): header['X-Auth-Token'] = Auth[i * 2] header['X-Auth-Nonce'] = Auth[i * 2 + 1] createMessage(idList[0], idList[i + 1], header, 'text', '哈囉,你好。這裡是Truelove客服。我們仍在處理中,請再等一下 ', '', '', '') createMessage(idList[3], idList[i + 1], header, 'text', '哈囉,你好。這裡是Truelove客服。我們仍在處理中,請再等一下 ', '', '', '') time.sleep(0.5) createMessage(idList[0], idList[i + 1], header, 'video', '', '', test_parameter['preview_url'], test_parameter['video_url']) createMessage(idList[3], idList[i + 1], header, 'video', '', '', test_parameter['preview_url'], test_parameter['video_url'])
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.clearLiveData(test_parameter['db']) header['X-Auth-Token'] = test_parameter['backend_token'] header['X-Auth-Nonce'] = test_parameter['backend_nonce'] initdata.initIdList(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [test_parameter['broadcaster_acc'], test_parameter['user_acc'], test_parameter['user1_acc']], idList) liveshowLib.createMember(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], memberList) liveshowLib.liveshowPrepare(test_parameter['prefix'], test_parameter['db'], header, 'TrueLove teams', 2, 0, 2, 3, 351, '', False, False, memberList, liveshowId)
def init(): initdata.set_test_data(env, test_parameter) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idlist) initdata.clearIMInfo(test_parameter['db']) initdata.clearPhoto(test_parameter['db'])
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.clearFansInfo(test_parameter['db']) initdata.clearPhoto(test_parameter['db']) initdata.clearNotiySetting(test_parameter['db']) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idList)
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['backend_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idList) initdata.clearFansInfo(test_parameter['db']) sqlList = ["insert into zego_master values ('" + idList[0] + "')"] dbConnect.dbSetting(test_parameter['db'], sqlList)
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.clearFansInfo(test_parameter['db']) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idlist) sqlList = [ "update gift_v2 set deleted_at = NULL, is_active = 1 where uuid = '234df236-8826-4938-8340-32f39df43ed1'" ] dbConnect.dbSetting(test_parameter['db'], sqlList)
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.clearConsumption(test_parameter['db']) initdata.clearIdentityData(test_parameter['db']) initdata.clearFansInfo(test_parameter['db']) initdata.initIdList(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'], 'liveAcc0004'], idList) header['X-Auth-Nonce'] = test_parameter['user_nonce'] header['X-Auth-Token'] = test_parameter['user_token'] api.set_tracking(test_parameter['prefix'], header, 'post', idList[4]) res = liveAcc0004Login() restext = json.loads(res.text) header['X-Auth-Nonce'] = restext['data']['nonce'] header['X-Auth-Token'] = restext['data']['token'] api.set_tracking(test_parameter['prefix'], header, 'post', idList[0]) idList.append(createAccountByEmail()) idList.append(loginByLine()) initVerifyData()
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.clearFansInfo(test_parameter['db']) initdata.clearPhoto(test_parameter['db']) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idList) header['X-Auth-Token'] = test_parameter['backend_token'] header['X-Auth-Nonce'] = test_parameter['backend_nonce'] for i in range(10): liveMasterList.append( api.search_user(test_parameter['prefix'], 'broadcaster01' + str(i), header)) api.changeRole(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], liveMasterList, 4) liveMasterList.append('')
def setup_module(): initdata.set_test_data(env, test_parameter) header['X-Auth-Token'] = test_parameter['backend_token'] header['X-Auth-Nonce'] = test_parameter['backend_nonce'] header['Content-Type'] = 'application/json' #generate 46 accounts id and add in indList list account_list = ["track{0:04d}".format(i) for i in range(101, 147)] global idList idList = [ api.search_user(test_parameter['prefix'], account, header) for account in account_list ] #generate 4 roles id and add in indList list initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idList)
def setup_module(): sqlList = [] create_At = int((datetime.today() - timedelta(hours=8)).strftime('%s')) initdata.set_test_data(env, test_parameter) initdata.clearFansInfo(test_parameter['db']) initdata.clearLiveData(test_parameter['db']) initdata.initIdList( test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [ test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['user_acc'], test_parameter['user1_acc'] ], idlist) for i in range(2): sqlStr = "insert into zego_master values('" + idlist[i] + "')" sqlList.append(sqlStr) sqlStr = "insert into top_sort values('" + idlist[ 0] + "', FROM_UNIXTIME(" + str(create_At) sqlStr += ", '%Y-%m-%d %H:%i:%s'), 'lisa', FROM_UNIXTIME(" + str( create_At) + ", '%Y-%m-%d %H:%i:%s'), 'lisa', 3, 0)" sqlList.append(sqlStr) dbConnect.dbSetting(test_parameter['db'], sqlList)
def setup_module(): initdata.set_test_data(env, test_parameter) header['X-Auth-Token'] = test_parameter['backend_token'] header['X-Auth-Nonce'] = test_parameter['backend_nonce'] initdata.initIdList(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc'], test_parameter['backend_acc'], test_parameter['liveController1_acc'], test_parameter['user_acc'], test_parameter['user1_acc']], idList)
def setup_module(): initdata.set_test_data(env, test_parameter) initdata.initIdList(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [test_parameter['broadcaster_acc'], test_parameter['broadcaster1_acc']], idList)
def setup_module(): initdata.set_test_data(env, test_parameter) dbConnect.dbSetting(test_parameter['db'], ["update identity set nickname = '123QQ' where login_Id in ('track0050', 'broadcaster005', 'lv000')"]) initdata.clearIdentityData(test_parameter['db']) initdata.initIdList(test_parameter['prefix'], test_parameter['backend_token'], test_parameter['backend_nonce'], [test_parameter['user_acc'], test_parameter['user1_acc']], idList)