Commit 45a8d6304e5b6cd22e2e707789d1a9afb862bdec
1 parent
d56f0c69
1
Showing
3 changed files
with
7 additions
and
6 deletions
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
tmp_t.py
0 → 100644