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 6 import commons as com
7 7 from commons.MySession import hg
8 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 11 create = createAndTrade()
12 12 # path = os.path.dirname(os.path.abspath(sys.argv[0]))
13 13 #查看文件有效路径
14 14 # print(sys.path)
15 15  
  16 +
16 17 # print(type(d),type(t))
17 18 print("\n开始运行订单创建脚本...\n")
18 19  
19 20  
20 21 #打印第三方请求json市场和请求次数
21   -print("请求参数={} 请求次数={}".format(d,tt))
  22 +print("请求参数={} 请求次数={}".format(d,t))
22 23  
23 24  
24 25 #根据用户参数进行请求
25 26 if d!=None :
26   - for i in range(tt):
  27 + for i in range(t):
27 28 body = d
28 29 print("创建订单,第{}次请求,请求body={}".format(i+1,body))
29 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 1 \ No newline at end of file
  2 +d={"1":1}
4 3 \ No newline at end of file
... ...
tmp_t.py 0 → 100644
  1 +t=3
0 2 \ No newline at end of file
... ...