Commit 7de68791d321bcbd51aea124e71f69dac5c76711

Authored by 175930106
Committed by liujiqiang
1 parent 0e40acf9

删除 def post2(self,session,account,**kwargs):

#解决不同接口对于不同用户的场景且需要统一使用setup里的登录session
        se=ll.get_session(account)
        re=session.post(**kwargs)
        ll.close_session()
        return re
src/commons/api/fieldConfig.py
... ... @@ -48,25 +48,5 @@ class fieldConfig(login):
48 48  
49 49  
50 50 # tt=fieldConfig()
51   -# print(id(tt.body))
52   -# print(id(upStream.body))
53   -# tt.body["order"]=111
54   -# print(tt.body)
55   -# print(upStream.body)
56   -# print(id(tt.body))
57   -# print(id(upStream.body))
58   -# #深拷贝
59   -# t1=tt.body.copy()
60   -# print(id(t1))
61   -# print(id(tt.body))
62   -# t1["rows"]="666"
63   -# print(id(t1))
64   -# print(id(tt.body))
65   -# print(t1)
66   -# print(tt.body)
67 51  
68   -# tt.post("sg_wenze", "111111",url=tt.url,headers=tt.header,json=tt.body,proxies={'http': 'http://localhost:8888'})
69   -
70   -# # print(tt.class_var)
71   -# # print(tt.login_url)
72 52 # tt.demo("sg_wenze", "111111",proxies={'http': 'http://localhost:8888'})
... ...
src/commons/api/upStream.py
... ... @@ -34,19 +34,12 @@ class upStream(login):
34 34 self.body=login.body
35 35  
36 36 def post(self,account,**kwargs):
37   - se=ll.get_session(account)
38   - re=se.post(**kwargs)
39   - ll.close_session()
40   - return re
41   -
42   - def post2(self,session,account,**kwargs):
43 37 #解决不同接口对于不同用户的场景
44 38 se=ll.get_session(account)
45   - re=session.post(**kwargs)
  39 + re=se.post(**kwargs)
46 40 ll.close_session()
47 41 return re
48 42  
49   -
50 43 tt=upStream()
51 44 # print(id(tt.body))
52 45 # print(id(upStream.body))
... ...
src/testcase/upStream/test_upStream.py
... ... @@ -34,7 +34,6 @@ class test_upStream1(unittest.TestCase):
34 34 #成功查询上下游企业,加入企业/个人名称过滤条件
35 35 body=uu.body.copy()
36 36 body["likeName"]="111"
37   - print("test_02_upStream",body)
38 37 re=self.se.post(url=uu.url,headers=uu.header,json=uu.body)
39 38 print(re.json())
40 39 self.assertEqual(re.status_code, 200)
... ...