Commit 9fa20e3d110d71482b172dfff0009cdefd66746b

Authored by lixi
1 parent e5edcd7d

更新进门称重的方法

testcase/CZFW/test_weightBizBill_listPage.py
@@ -22,6 +22,7 @@ class test_weightBizBill_listPage(unittest.TestCase): @@ -22,6 +22,7 @@ class test_weightBizBill_listPage(unittest.TestCase):
22 #获取当前时间 22 #获取当前时间
23 self.time=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) 23 self.time=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
24 #新增数据 24 #新增数据
  25 + ad.refresh_commit_token()
25 body=ad.body.copy() 26 body=ad.body.copy()
26 car=ca.car_list()["data"] 27 car=ca.car_list()["data"]
27 body["carTypeId"]=car[0]["id"] 28 body["carTypeId"]=car[0]["id"]
@@ -29,11 +30,11 @@ class test_weightBizBill_listPage(unittest.TestCase): @@ -29,11 +30,11 @@ class test_weightBizBill_listPage(unittest.TestCase):
29 body["carTypeCode"]=car[0]["code"] 30 body["carTypeCode"]=car[0]["code"]
30 self.re=sy1.post(url=ad.url,headers=ad.header,json=body) 31 self.re=sy1.post(url=ad.url,headers=ad.header,json=body)
31 #刷新防重码 32 #刷新防重码
32 - ad.refresh_commit_token()  
33 33
34 @unittest.case_mark(my.mark()) 34 @unittest.case_mark(my.mark())
35 def test_weightBizBill_listPage_01(self): 35 def test_weightBizBill_listPage_01(self):
36 "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据" 36 "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据"
  37 + print("1111", self.re.json())
37 body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace( 38 body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace(
38 "carTypeId=53","carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace( 39 "carTypeId=53","carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace(
39 "depId=139","depId={}".format(sy1.user["sy_user01"]["departmentId"])) 40 "depId=139","depId={}".format(sy1.user["sy_user01"]["departmentId"]))