Commit 0271554f81c571620c01ddd850c97027b1be4b96

Authored by lixi
2 parents 622c338e af52fb9c

Merge branch 'master' of http://git3.nong12.com/autotest/test-scripts

 Conflicts:
	report/test.log
__init__.py 0 → 100644
  1 +# -*- coding: utf-8 -*-
  2 +
  3 +# @Time : 2021/9/29 14:05
  4 +# @Author : Ljq
  5 +# @File : __init__.py
  6 +# @Software: PyCharm
  7 +
  8 +"""
  9 +
  10 +"""
  11 +import os,sys
  12 +
  13 +sys.path.append(os.path.dirname(__file__))
0 14 \ No newline at end of file
... ...
testcase/hg/createBatch/createBatch.py
... ... @@ -18,8 +18,8 @@ from commons.MySession import sessionHg
18 18  
19 19 class createBat(object):
20 20 def __init__(self):
21   - self.host = rC.returnOptionsItems("host", "gatewayHost")
22 21 data = {i.split("=")[0]: i.split("=")[1] for i in sys.argv if "=" in i}
  22 + print(data)
23 23 if "ic" not in data.keys() or data["ic"] == "":
24 24 self.ic = rC.returnOptionsItems("testInfo", "hg_cardNumRe_01")
25 25 if "goodsName" not in data.keys() or data["goodsName"] == "":
... ... @@ -33,7 +33,11 @@ class createBat(object):
33 33 if "weight" not in data.keys() or data["weight"] == "":
34 34 self.weight = "50"
35 35  
  36 + # host信息准备
  37 + self.host = rC.returnOptionsItems("host", "gatewayHost")
  38 +
36 39 def main(self):
  40 + print("main")
37 41 res = CIMG.create_registerRecord(session=sessionHg,ic=self.ic,host=self.host,goodsName=self.goodsName,
38 42 allLevelKeyword=self.allLevelKeyword,nameLike=self.nameLike,
39 43 tradePassword=self.tradePassword,weight=self.weight)
... ... @@ -41,4 +45,5 @@ class createBat(object):
41 45 print(res.json()["data"]["batchCode"])
42 46  
43 47  
  48 +# 调用
44 49 createBat = createBat().main()
45 50 \ No newline at end of file
... ...