Commit ca182f78fba7b68531e6b8ad916160d560a67e1d
Merge remote-tracking branch 'origin/master'
Showing
2 changed files
with
7 additions
and
5 deletions
testcase/CZFW/test_weightBizBill_listPage.py
... | ... | @@ -23,9 +23,10 @@ class test_weightBizBill_listPage(unittest.TestCase): |
23 | 23 | self.time=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) |
24 | 24 | #新增数据 |
25 | 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 | 30 | self.re=sy1.post(url=ad.url,headers=ad.header,json=body) |
30 | 31 | #刷新防重码 |
31 | 32 | ad.refresh_commit_token() |
... | ... | @@ -35,7 +36,7 @@ class test_weightBizBill_listPage(unittest.TestCase): |
35 | 36 | "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据" |
36 | 37 | body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace( |
37 | 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 | 40 | re=sy1.post(url=bi.url,headers=bi.header,data=body) |
40 | 41 | print(re.json()) |
41 | 42 | self.assertEqual(re.status_code, 200) | ... | ... |
testcase/weightBizBill/test_weighingServiceSave.py
... | ... | @@ -27,6 +27,7 @@ class test_weighingServiceSave(unittest.TestCase): |
27 | 27 | @unittest.case_mark(my.mark()) |
28 | 28 | def test_weighingServiceSave_01(self): |
29 | 29 | "称重服务:成功新增一条称重服务单" |
30 | + print(self.__doc__) | |
30 | 31 | body=we.body.copy() |
31 | 32 | car=li.car_list()["data"] |
32 | 33 | body["carTypeId"]=car[0]["id"] |
... | ... | @@ -45,6 +46,6 @@ class test_weighingServiceSave(unittest.TestCase): |
45 | 46 | |
46 | 47 | if __name__ == "__main__": |
47 | 48 | |
48 | - # unittest.main(verbosity=2) | |
49 | + unittest.main(verbosity=2) | |
49 | 50 | |
50 | 51 | com.run_list([test_weighingServiceSave("test_weighingServiceSave_01"),test_weighingServiceSave("test_weighingServiceSave_02")]) | ... | ... |