def setUp(self): cfg_info = NewConfig() self.common, self.headers = cfg_info.get_info(devices_name="vivox6") self.t = LoginApi() self.access_token = self.t.get_access_token(self.common, self.headers) self.s_detail = GetServiceDetail(self.common, self.headers, self.access_token) self.response = self.s_detail.get_service_detail()
def setUp(self): cfg_info = NewConfig() self.common, self.headers = cfg_info.get_info(devices_name="vivox6") self.t = LoginApi() self.access_token = self.t.get_access_token(self.common, self.headers) self.ex_p90 = PostExperience(self.common, self.headers, self.access_token) self.services_info = GetServiceInfo(self.common, self.headers, self.access_token) self.task_info = GetTaskInfo2(self.common, self.headers, self.access_token) self.at_result = GetAllArtTrainResultAnswer(self.common, self.headers, self.access_token)
def setUp(self): cfg_info = NewConfig() self.common, self.headers = cfg_info.get_info() t = LoginApi() self.access_token = t.get_access_token(self.common, self.headers) self.sevicesID = t.get_user_study_center(self.common, self.headers, self.access_token) get_measure_id = GetMeasureInfo(self.common, self.headers, self.access_token) _, self.mID, _ = get_measure_id.get_sys_id(self.sevicesID) self.report = GetMeasureReport(self.common, self.headers, self.access_token)
def setUpClass(cls): cfg_info = NewConfig() common, headers = cfg_info.get_info(devices_name="vivox6") t = LoginApi() cls.access_token = t.get_access_token(common, headers) cls.sevicesID = t.get_user_study_center(common, headers, cls.access_token) cls.sys = GetMeasureInfo(common, headers, cls.access_token) cls.mWords = GetMeasureWords(common, headers, cls.access_token) cls.word_postAnswer = PostMeasureWords(common, headers, cls.access_token) cls.mGra = GetMeasureGra(common, headers, cls.access_token) cls.gra_postAnswer = PostMeasureGra(common, headers, cls.access_token) cls.mLis = GetMeasureListen(common, headers, cls.access_token) cls.lis_postAnswer = PostMeasureLis(common, headers, cls.access_token) cls.mRead = GetMeasureRead(common, headers, cls.access_token) cls.rid_postAnswer = PostMeasureRead(common, headers, cls.access_token) cls.mWrite = GetMeasureWrite(common, headers, cls.access_token) cls.wri_postAnswer = PostMeasureWrite(common, headers, cls.access_token)
for task in datas.get("GRA"): finish_gra(task, common, headers, access_token) if datas.get("LIS"): for task in datas.get("LIS"): t = threading.Thread(target=finish_lis, args=(task, common, headers, access_token)) t.start() if datas.get("WRI"): for task in datas.get("WRI"): t = threading.Thread(target=finish_wri, args=(task, common, headers, access_token)) t.start() if __name__ == '__main__': cfg_info = NewConfig() devices = cfg_info.get_info('vivox6') common, headers = cfg_info.get_info("vivox6") print(common, headers) t = LoginApi() access_token = t.get_access_token(common, headers) print("access_token:".capitalize(), access_token) while True: try: step1 = GetServiceInfo(common, headers, access_token) step1_ids = step1.get_service_id() servicesID, _, _, = step1_ids print("Step1 return:", step1_ids) step2 = GetTaskInfo(common, headers, access_token) step2_ids = step2.get_task_id(servicesID) print("step2_ids", step2_ids)
def setUp(self): cfg_info = NewConfig() self.common, self.headers = cfg_info.get_info() self.t = LoginApi()