test_createTradingOrder.py
824 Bytes
import sys
# sys.path.extend(['E:\\PycharmWorkspace\\test-scripts'])
sys.path.extend(['/usr/jenkins/workspace/辅助脚本-创建交易单simple'])
import commons as com
from commons.MySession import hg
from commons.basic.createAndTrade import createAndTrade
from tmp import data
create = createAndTrade()
print(data)
cmd_list=sys.argv[1:]
print(cmd_list)
if len(cmd_list)!=0:
for i in range(len(cmd_list)):
print("参数值",i,cmd_list[i])
# print("测试市场{}".format(cmd_list[0]))
# print("请求body{}".format(cmd_list[1]))
# print("请求次数{}".format(cmd_list[2]))
if data!="None":
for i in range(int(cmd_list[1])):
body = data
print("创建订单body",body)
re = hg.post(url = create.url, headers = create.header, json = body)
print(re.json())