Commit 207fb21d by wj

Update request_method.py

parent 0bb23dcf
...@@ -24,8 +24,7 @@ class RequestMethod: ...@@ -24,8 +24,7 @@ class RequestMethod:
# 创建Session对象 # 创建Session对象
self.bpm_session = requests.sessions.Session() self.bpm_session = requests.sessions.Session()
# 更新token # 更新token
self.bpm_session.headers["Authorization"] = f'Bearer { self.bpm_session.headers["Authorization"] = f'Bearer {self.bpm_session.request(method="post", url=login_url, json=login_data).json().get("token")}'
self.bpm_session.request(method="post", url=login_url, json=login_data).json().get("token")}'
def request_all(self, case_url, case_method, case_mime, case_data): def request_all(self, case_url, case_method, case_mime, case_data):
# 封装公共的请求方法,根据不同的用例媒体类型使用不同的关键字传参 # 封装公共的请求方法,根据不同的用例媒体类型使用不同的关键字传参
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment