コード例 #1
0
 def test_edit_team(self):
     u"""编辑团队接口"""
     create_team()
     teamId = get_team_id()
     team_name = random_team_name()
     new_params = dict(teamId, **team_name)
     logger.warning(params_log + str(new_params))
     r = requests.post(url=self.url, data=new_params)
     res = r.json()
     result = json.dumps(res, ensure_ascii=False)
     logger.warning(res_log + result)
     assert_equal(r.status_code, 200)
     assert_equal(res['status'], self.res['status'])
     assert_equal(res['msg'], self.res['msg'])
     delete_team(teamId)
コード例 #2
0
 def test_add_team_member(self):
     u"""添加团队成员接口"""
     create_team()
     teamId = get_team_id()
     userToken = get_token()
     new_params = dict(userToken, **teamId, **self.params)
     logger.warning(params_log + str(new_params))
     r = requests.post(url=self.url, data=new_params)
     res = r.json()
     result = json.dumps(res, ensure_ascii=False)
     logger.warning(res_log + result)
     assert_equal(r.status_code, 200)
     assert_equal(res['status'], self.res['status'])
     assert_equal(res['msg'], self.res['msg'])
     delete_team(teamId)
     logger.info('删除团队成功')