Esempio n. 1
0
 def test_register(self):
     method = 'POST'
     url = do_config.get_value('request', 'default_address')
     path = '/member/register'
     data = {"mobilephone": "${not_existed_tel}", "pwd": self.pwd, "regname": self.reg_name}
     tel_list = []
     for i in range(3):
         not_existed_tel = str(self.not_existed_tel())
         tel_list.append(not_existed_tel)
         data_re = re.sub(r'\${not_existed_tel}', not_existed_tel, str(data))
         request_result = do_request.send_request(method, url=url + path, data=eval(data_re))
     do_request.request_close()
     return tel_list
Esempio n. 2
0
 def tearDown(self):
     wb, ws = self.my_HandleExcel.load_excel()
     wb.save(DATA_COMMON_FILE_PATH)
     wb.close()
     do_request.request_close()
 def tearDownClass(cls):
     my_excel.close_excel()
     do_request.request_close()
     do_logger.info('\n{:=^40s}\n'.format('用例执行结束'))