Commit ca182f78fba7b68531e6b8ad916160d560a67e1d

Authored by wenleiming
2 parents 8eab3347 e5edcd7d

Merge remote-tracking branch 'origin/master'

testcase/CZFW/test_weightBizBill_listPage.py
@@ -23,9 +23,10 @@ class test_weightBizBill_listPage(unittest.TestCase): @@ -23,9 +23,10 @@ class test_weightBizBill_listPage(unittest.TestCase):
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 body=ad.body.copy() 25 body=ad.body.copy()
26 - body["carTypeId"]=ca.car_list()["data"][0]["id"]  
27 - body["carTypeName"]=ca.car_list()["data"][0]["carTypeName"]  
28 - body["carTypeCode"]=ca.car_list()["data"][0]["code"] 26 + car=ca.car_list()["data"]
  27 + body["carTypeId"]=car[0]["id"]
  28 + body["carTypeName"]=car[0]["carTypeName"]
  29 + body["carTypeCode"]=car[0]["code"]
29 self.re=sy1.post(url=ad.url,headers=ad.header,json=body) 30 self.re=sy1.post(url=ad.url,headers=ad.header,json=body)
30 #刷新防重码 31 #刷新防重码
31 ad.refresh_commit_token() 32 ad.refresh_commit_token()
@@ -35,7 +36,7 @@ class test_weightBizBill_listPage(unittest.TestCase): @@ -35,7 +36,7 @@ class test_weightBizBill_listPage(unittest.TestCase):
35 "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据" 36 "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据"
36 body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace( 37 body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace(
37 "carTypeId=53","carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace( 38 "carTypeId=53","carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace(
38 - "depId=139","depId={}".format(my.user["sy_user01"]["departmentId"])) 39 + "depId=139","depId={}".format(sy1.user["sy_user01"]["departmentId"]))
39 re=sy1.post(url=bi.url,headers=bi.header,data=body) 40 re=sy1.post(url=bi.url,headers=bi.header,data=body)
40 print(re.json()) 41 print(re.json())
41 self.assertEqual(re.status_code, 200) 42 self.assertEqual(re.status_code, 200)
testcase/weightBizBill/test_weighingServiceSave.py
@@ -27,6 +27,7 @@ class test_weighingServiceSave(unittest.TestCase): @@ -27,6 +27,7 @@ class test_weighingServiceSave(unittest.TestCase):
27 @unittest.case_mark(my.mark()) 27 @unittest.case_mark(my.mark())
28 def test_weighingServiceSave_01(self): 28 def test_weighingServiceSave_01(self):
29 "称重服务:成功新增一条称重服务单" 29 "称重服务:成功新增一条称重服务单"
  30 + print(self.__doc__)
30 body=we.body.copy() 31 body=we.body.copy()
31 car=li.car_list()["data"] 32 car=li.car_list()["data"]
32 body["carTypeId"]=car[0]["id"] 33 body["carTypeId"]=car[0]["id"]
@@ -45,6 +46,6 @@ class test_weighingServiceSave(unittest.TestCase): @@ -45,6 +46,6 @@ class test_weighingServiceSave(unittest.TestCase):
45 46
46 if __name__ == "__main__": 47 if __name__ == "__main__":
47 48
48 - # unittest.main(verbosity=2) 49 + unittest.main(verbosity=2)
49 50
50 com.run_list([test_weighingServiceSave("test_weighingServiceSave_01"),test_weighingServiceSave("test_weighingServiceSave_02")]) 51 com.run_list([test_weighingServiceSave("test_weighingServiceSave_01"),test_weighingServiceSave("test_weighingServiceSave_02")])