Commit 4f99a95940f1cad5e0bfe4b4356fd09a68a51051

Authored by lixi
1 parent d7ab0697

更新进门称重的方法

commons/common.py
@@ -118,8 +118,6 @@ def run_Name(name): @@ -118,8 +118,6 @@ def run_Name(name):
118 118
119 def mylog(func): 119 def mylog(func):
120 def RebackTest(self): 120 def RebackTest(self):
121 - print(func.__name__)  
122 - print(dir(func))  
123 - # print(self) 121 + log.info("{}".format(func.__name__))
124 return func(self) 122 return func(self)
125 return RebackTest 123 return RebackTest
126 \ No newline at end of file 124 \ No newline at end of file
config/api/sy/userApi.py
@@ -30,7 +30,7 @@ data={ @@ -30,7 +30,7 @@ data={
30 "email": "shenyangtangchuan@diligrp.com", 30 "email": "shenyangtangchuan@diligrp.com",
31 "firmCode": "sy", 31 "firmCode": "sy",
32 "id": 228, 32 "id": 228,
33 - "lastLoginTime": "2021-08-04 15:50:24", 33 + "lastLoginTime": "2021-08-05 16:23:14",
34 "metadata": {}, 34 "metadata": {},
35 "modified": "2021-07-13 15:56:44", 35 "modified": "2021-07-13 15:56:44",
36 "password": "DABF2BB8F4A3D0AAE5", 36 "password": "DABF2BB8F4A3D0AAE5",
@@ -67,7 +67,7 @@ data={ @@ -67,7 +67,7 @@ data={
67 "email": "shenyangdagang@diligrp.com", 67 "email": "shenyangdagang@diligrp.com",
68 "firmCode": "sy", 68 "firmCode": "sy",
69 "id": 320, 69 "id": 320,
70 - "lastLoginTime": "2021-08-04 15:23:56", 70 + "lastLoginTime": "2021-08-06 10:05:46",
71 "metadata": {}, 71 "metadata": {},
72 "modified": "2021-07-13 15:56:44", 72 "modified": "2021-07-13 15:56:44",
73 "password": "18965EB72C92A549DD", 73 "password": "18965EB72C92A549DD",
testcase/weightBizBill/test_weighingServiceSave.py
@@ -11,25 +11,27 @@ we=weighingServiceSave(sy1) @@ -11,25 +11,27 @@ we=weighingServiceSave(sy1)
11 li=listCarType(sy1) 11 li=listCarType(sy1)
12 12
13 13
14 -@com.mylog 14 +
15 class test_weighingServiceSave(unittest.TestCase): 15 class test_weighingServiceSave(unittest.TestCase):
16 "称重服务" 16 "称重服务"
17 17
  18 +
18 @classmethod 19 @classmethod
19 def setUpClass(cls): 20 def setUpClass(cls):
20 pass 21 pass
21 22
22 -  
23 def setUp(self) : 23 def setUp(self) :
24 pass 24 pass
25 25
  26 + @com.mylog
26 @unittest.case_mark(my.mark()) 27 @unittest.case_mark(my.mark())
27 def test_weighingServiceSave_01(self): 28 def test_weighingServiceSave_01(self):
28 "称重服务:成功新增一条称重服务单" 29 "称重服务:成功新增一条称重服务单"
29 body=we.body.copy() 30 body=we.body.copy()
30 - body["carTypeId"]=li.car_list()["data"][0]["id"]  
31 - body["carTypeName"]=li.car_list()["data"][0]["carTypeName"]  
32 - body["carTypeCode"]=li.car_list()["data"][0]["code"] 31 + car=li.car_list()["data"]
  32 + body["carTypeId"]=car[0]["id"]
  33 + body["carTypeName"]=car[0]["carTypeName"]
  34 + body["carTypeCode"]=car[0]["code"]
33 re=sy1.post(url=we.url,headers=we.header,json=body) 35 re=sy1.post(url=we.url,headers=we.header,json=body)
34 print(re.json()) 36 print(re.json())
35 self.assertEqual(re.status_code, 200) 37 self.assertEqual(re.status_code, 200)