def onAir(): #print('onAir') header['X-Auth-Token'] = test_parameter['broadcaster_token'] header['X-Auth-Nonce'] = test_parameter['broadcaster_nonce'] rid, chatlib, sock = sundry.Openroom(test_parameter['prefix'], header, 5, False, 0, '608行開播', 5) time.sleep(2) chatlib.leave_room(rid, sock) return
def testGeLiveList(test_input, expected): zegoInfo = openZego() #print('room id = %d' %zegoInfo[1]) chatlib.leave_room(zegoInfo[1], zegoInfo[0]) if test_input[2] else None header['X-Auth-Token'] = test_input[0] header['X-Auth-Nonce'] = test_input[1] apiName = '/api/v2/backend/liveMaster/liveRoom/' + str(zegoInfo[1]) #print(apiName) res = api.apiFunction(test_parameter['prefix'], header, apiName, 'delete', None) #restext = json.loads(res.text) assert res.status_code // 100 == expected[0] #pprint(restext) time.sleep(6)
def teardonw_functiob(): chatlib.leave_room(zegoInfo[1], zegoInfo[0]) time.sleep(5)
def teardown_class(self): chatlib.leave_room(self.chat[0], self.chat[1]) if self.chat != [] else None
def teardown_module(): for i in range(1, (len(zegoInfo) // 2)): chatlib.leave_room(zegoInfo[i * 2], zegoInfo[i * 2 + 1])