failure():将响应报告为失败
success():将响应报告为成功
with self.client.get("/web/users/details", catch_response=True, name='users/details') as response:
# print(f'这是第{i}个用户发的请求{j}:{response.text}')
if response.status_code == 401:
response.success()
else:
response.failure('not 401 code')