Commit 45a8d6304e5b6cd22e2e707789d1a9afb862bdec

Authored by lixi
1 parent d56f0c69

1

testcase/hg/createTradingOrder/test_createTradingOrder.py
@@ -6,24 +6,25 @@ sys.path.extend(['/usr/jenkins/workspace/辅助脚本-创建交易单simple']) @@ -6,24 +6,25 @@ sys.path.extend(['/usr/jenkins/workspace/辅助脚本-创建交易单simple'])
6 import commons as com 6 import commons as com
7 from commons.MySession import hg 7 from commons.MySession import hg
8 from commons.basic.createAndTrade import createAndTrade 8 from commons.basic.createAndTrade import createAndTrade
9 -from tmp import d  
10 -from tmp import tt 9 +from tmp_d import d
  10 +from tmp_t import t
11 create = createAndTrade() 11 create = createAndTrade()
12 # path = os.path.dirname(os.path.abspath(sys.argv[0])) 12 # path = os.path.dirname(os.path.abspath(sys.argv[0]))
13 #查看文件有效路径 13 #查看文件有效路径
14 # print(sys.path) 14 # print(sys.path)
15 15
  16 +
16 # print(type(d),type(t)) 17 # print(type(d),type(t))
17 print("\n开始运行订单创建脚本...\n") 18 print("\n开始运行订单创建脚本...\n")
18 19
19 20
20 #打印第三方请求json市场和请求次数 21 #打印第三方请求json市场和请求次数
21 -print("请求参数={} 请求次数={}".format(d,tt)) 22 +print("请求参数={} 请求次数={}".format(d,t))
22 23
23 24
24 #根据用户参数进行请求 25 #根据用户参数进行请求
25 if d!=None : 26 if d!=None :
26 - for i in range(tt): 27 + for i in range(t):
27 body = d 28 body = d
28 print("创建订单,第{}次请求,请求body={}".format(i+1,body)) 29 print("创建订单,第{}次请求,请求body={}".format(i+1,body))
29 re = hg.post(url = create.url, headers = create.header, json = body) 30 re = hg.post(url = create.url, headers = create.header, json = body)
tmp.py renamed to tmp_d.py
1 -d={"1":1}  
2 -tt=3  
3 \ No newline at end of file 1 \ No newline at end of file
  2 +d={"1":1}
4 \ No newline at end of file 3 \ No newline at end of file
tmp_t.py 0 → 100644
  1 +t=3
0 \ No newline at end of file 2 \ No newline at end of file