Commit 1f1356202edc2ffefc05b778a6524e65c42c3f09
1 parent
d8b64161
更新进门称重的方法
Showing
2 changed files
with
4 additions
and
5 deletions
commons/Logging.py
1 | 1 | #!/usr/bin/python |
2 | 2 | # -*- coding: UTF-8 -*- |
3 | 3 | import logging,os |
4 | +from mylog import mylogger,logg | |
5 | + | |
4 | 6 | |
5 | 7 | class Logger(): |
6 | 8 | |
7 | 9 | def __init__(self, path=__name__,clevel = logging.ERROR,Flevel = logging.DEBUG,test = 'w'): |
8 | 10 | current_path=os.path.dirname(os.path.dirname(__file__)) |
9 | 11 | path=current_path+"/report"+"/test.log" |
12 | + setattr(mylogger, "logpath", path) | |
13 | + logg.setting() | |
10 | 14 | |
11 | 15 | self.logger = logging.getLogger(path) |
12 | 16 | ... | ... |
commons/MySession.py
... | ... | @@ -91,11 +91,6 @@ class mysession(requests.Session): |
91 | 91 | # requests.session()会话保持,比如使用session成功的登录了某个网站, |
92 | 92 | # 则在再次使用该session对象求求该网站的其他网页都会默认使用该session之前使用的cookie等参数 |
93 | 93 | tmp = requests.post(url=self.url_client, headers=self.header_client, json=self.body_client, proxies=self.proxies, **kwargs) |
94 | - # 使用session对象的方法POST/GET等 | |
95 | - #获取关键信息供其他接口header使用 | |
96 | - # self.UAP_accessToken=tmp.json()["data"]["accessToken"] | |
97 | - # self.UAP_refreshToken=tmp.json()["data"]["refreshToken"] | |
98 | - # 返回session对象,供其他接口使用 | |
99 | 94 | return tmp |
100 | 95 | |
101 | 96 | def get_session_client(self, account, **kwargs): | ... | ... |