Commit 4ceff2aab1e22530b6a01025ff998b6fb944101a
1 parent
60891f49
优化测试用例的代码
Showing
4 changed files
with
6 additions
and
4 deletions
commons/api/weighingServiceSave.py
... | ... | @@ -46,7 +46,6 @@ class weighingServiceSave(): |
46 | 46 | self.market=market |
47 | 47 | self.url = weighingServiceSave.url.replace("http://test.", com.get_global_config("global_data", "environment", "en")) |
48 | 48 | self.header = weighingServiceSave.header |
49 | - self.header["jmsf_duplicate_commit_token"] = duplicateToken(self.market).jmsf_duplicate_commit_token() | |
50 | 49 | self.header["UAP_accessToken"] = self.market.cookies["UAP_accessToken"] |
51 | 50 | self.header["UAP_refreshToken"] = self.market.cookies["UAP_refreshToken"] |
52 | 51 | self.header["UAP_firmId"] = self.market.cookies["UAP_firmId"] | ... | ... |
testcase/CZFW/test_weightBizBill_doRefund.py
testcase/CZFW/test_weightBizBill_listPage.py
... | ... | @@ -21,15 +21,16 @@ class test_weightBizBill_listPage(unittest.TestCase): |
21 | 21 | "数据准备:新增一条称重单" |
22 | 22 | #获取当前时间 |
23 | 23 | self.time=time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) |
24 | - #新增数据 | |
24 | + #刷新增防重码 | |
25 | 25 | ad.refresh_commit_token() |
26 | + #新增数据 | |
26 | 27 | body=ad.body.copy() |
27 | 28 | car=ca.car_list()["data"] |
28 | 29 | body["carTypeId"]=car[0]["id"] |
29 | 30 | body["carTypeName"]=car[0]["carTypeName"] |
30 | 31 | body["carTypeCode"]=car[0]["code"] |
31 | 32 | self.re=sy1.post(url=ad.url,headers=ad.header,json=body) |
32 | - #刷新防重码 | |
33 | + | |
33 | 34 | |
34 | 35 | @unittest.case_mark(my.mark()) |
35 | 36 | def test_weightBizBill_listPage_01(self): | ... | ... |
testcase/weightBizBill/test_weighingServiceSave.py