Commit 3c550dc61bd8695a48c8be77c371eba223ff9e6d
1 parent
e5edbd8a
1.更新沈阳市场和哈尔滨市场的session名称
2.更新沈阳市场和哈尔滨市场的用例class注释,加入市场名称,以区分用例绑定的市场。
Showing
11 changed files
with
48 additions
and
45 deletions
commons/api/weighingServiceSave.py
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | # -*- coding: UTF-8 -*- |
3 | 3 | import urllib3 |
4 | 4 | from commons import common as com |
5 | -from commons.MySession import my,sy1 | |
5 | +from commons.MySession import my,sy1,heb | |
6 | 6 | from commons.basic.duplicateToken import duplicateToken |
7 | 7 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
8 | 8 | |
... | ... | @@ -57,6 +57,9 @@ class weighingServiceSave(): |
57 | 57 | |
58 | 58 | |
59 | 59 | |
60 | -# tt=weighingServiceSave(sy1) | |
61 | -# re=sy1.post(url=tt.url,headers=tt.header,json=tt.body) | |
62 | -# print(re.json()) | |
63 | 60 | \ No newline at end of file |
61 | +# tt=weighingServiceSave(heb) | |
62 | +# tt.refresh_commit_token() | |
63 | +# re=heb.post(url=tt.url,headers=tt.header,json=tt.body) | |
64 | +# print(re.json()) | |
65 | +# print(heb.user.sort()) | |
66 | +# print(sy1.user.sort()) | |
64 | 67 | \ No newline at end of file | ... | ... |
testcase/heb/CZFW/test_weightBizBill_doRefund.py
... | ... | @@ -4,18 +4,18 @@ import unittest |
4 | 4 | import urllib3 |
5 | 5 | from commons import common as com |
6 | 6 | from commons import ConfigDB as db |
7 | -from commons.MySession import my,sy1 | |
7 | +from commons.MySession import my,heb | |
8 | 8 | from commons.api.weightBizBill_doRefund import weightBizBill_doRefund |
9 | 9 | from commons.api.weighingServiceSave import weighingServiceSave |
10 | 10 | from commons.basic.listCarType import listCarType |
11 | 11 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
12 | 12 | do=weightBizBill_doRefund() |
13 | -ad=weighingServiceSave(sy1) | |
14 | -ca=listCarType(sy1) | |
13 | +ad=weighingServiceSave(heb) | |
14 | +ca=listCarType(heb) | |
15 | 15 | |
16 | 16 | |
17 | 17 | class test_weightBizBill_doRefund(unittest.TestCase): |
18 | - "称重服务-称重服务单列表" | |
18 | + "哈尔滨市场-称重服务-称重服务单列表" | |
19 | 19 | |
20 | 20 | |
21 | 21 | def setUp(self): |
... | ... | @@ -28,13 +28,13 @@ class test_weightBizBill_doRefund(unittest.TestCase): |
28 | 28 | body["carTypeId"]=car[0]["id"] |
29 | 29 | body["carTypeName"]=car[0]["carTypeName"] |
30 | 30 | body["carTypeCode"]=car[0]["code"] |
31 | - self.re=sy1.post(url=ad.url,headers=ad.header,json=body) | |
31 | + self.re=heb.post(url=ad.url,headers=ad.header,json=body) | |
32 | 32 | |
33 | 33 | @unittest.case_mark(my.mark()) |
34 | 34 | def test_weightBizBill_doRefund_01(self): |
35 | 35 | "称重服务单列表-退款:成功退款一个现金交费的称重单" |
36 | 36 | body=do.body.replace("206",str(self.re.json()["data"]["id"])) |
37 | - re=sy1.post(url=do.url,headers=do.header,data=body.encode('utf-8')) | |
37 | + re=heb.post(url=do.url,headers=do.header,data=body.encode('utf-8')) | |
38 | 38 | print(re.json()) |
39 | 39 | #获取退款后称重单的状态,3为已退款 |
40 | 40 | bill_status=db.mysql_selectOne( | ... | ... |
testcase/heb/CZFW/test_weightBizBill_listPage.py
... | ... | @@ -4,18 +4,18 @@ import unittest |
4 | 4 | import urllib3 |
5 | 5 | import time |
6 | 6 | from commons import common as com |
7 | -from commons.MySession import my,sy1 | |
7 | +from commons.MySession import my,heb | |
8 | 8 | from commons.api.weightBizBill_listPage import weightBizBill_listPage |
9 | 9 | from commons.api.weighingServiceSave import weighingServiceSave |
10 | 10 | from commons.basic.listCarType import listCarType |
11 | 11 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
12 | 12 | bi=weightBizBill_listPage() |
13 | -ad=weighingServiceSave(sy1) | |
14 | -ca=listCarType(sy1) | |
13 | +ad=weighingServiceSave(heb) | |
14 | +ca=listCarType(heb) | |
15 | 15 | |
16 | 16 | |
17 | 17 | class test_weightBizBill_listPage(unittest.TestCase): |
18 | - "称重服务-称重服务单列表" | |
18 | + "哈尔滨市场-称重服务-称重服务单列表" | |
19 | 19 | |
20 | 20 | def setUp(self): |
21 | 21 | "数据准备:新增一条称重单" |
... | ... | @@ -29,7 +29,7 @@ class test_weightBizBill_listPage(unittest.TestCase): |
29 | 29 | body["carTypeId"]=car[0]["id"] |
30 | 30 | body["carTypeName"]=car[0]["carTypeName"] |
31 | 31 | body["carTypeCode"]=car[0]["code"] |
32 | - self.re=sy1.post(url=ad.url,headers=ad.header,json=body) | |
32 | + self.re=heb.post(url=ad.url,headers=ad.header,json=body) | |
33 | 33 | |
34 | 34 | |
35 | 35 | @unittest.case_mark(my.mark()) |
... | ... | @@ -37,8 +37,8 @@ class test_weightBizBill_listPage(unittest.TestCase): |
37 | 37 | "称重服务单列表-查询:查询条件为“单据编号”,其余查询条件输入合法值,查询一条指定数据" |
38 | 38 | body=bi.body.replace("202108030900001",self.re.json()["data"]["number"]).replace( |
39 | 39 | "carTypeId=53","carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace( |
40 | - "depId=139","depId={}".format(sy1.user["sy_user01"]["departmentId"])) | |
41 | - re=sy1.post(url=bi.url,headers=bi.header,data=body) | |
40 | + "depId=139","depId={}".format(heb.user["sy_user01"]["departmentId"])) | |
41 | + re=heb.post(url=bi.url,headers=bi.header,data=body) | |
42 | 42 | print(re.json()) |
43 | 43 | self.assertEqual(re.status_code, 200) |
44 | 44 | self.assertTrue("'total':1" in str(re.json()).replace(" ","")) |
... | ... | @@ -51,8 +51,8 @@ class test_weightBizBill_listPage(unittest.TestCase): |
51 | 51 | "202108030900001","{}".format(ad.body["plate"])).replace( |
52 | 52 | "2020-08-03 00:00:00","{}".format(self.time)).replace( |
53 | 53 | "carTypeId=53", "carTypeId={}".format(ca.car_list()["data"][0]["id"])).replace( |
54 | - "depId=139", "depId={}".format(sy1.user["sy_user01"]["departmentId"])) | |
55 | - re=sy1.post(url=bi.url,headers=bi.header,data=body.encode('utf-8')) | |
54 | + "depId=139", "depId={}".format(heb.user["sy_user01"]["departmentId"])) | |
55 | + re=heb.post(url=bi.url,headers=bi.header,data=body.encode('utf-8')) | |
56 | 56 | print(re.json()) |
57 | 57 | self.assertEqual(re.status_code, 200) |
58 | 58 | self.assertTrue(ad.body["plate"] in str(re.json()).replace(" ","")) | ... | ... |
testcase/heb/entranceFeeBill_detail/test_entranceFeeBill_details.py
... | ... | @@ -4,14 +4,14 @@ import unittest |
4 | 4 | import urllib3 |
5 | 5 | from commons import ConfigDB as db |
6 | 6 | from commons import common as com |
7 | -from commons.MySession import my,sy1 | |
7 | +from commons.MySession import my,heb | |
8 | 8 | from commons.api.entranceFeeBill_details import entranceFeeBill_details |
9 | 9 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
10 | 10 | en=entranceFeeBill_details() |
11 | 11 | |
12 | 12 | |
13 | 13 | class test_entranceFeeBill_details(unittest.TestCase): |
14 | - "进门收费管理-收费单标记" | |
14 | + "哈尔滨市场-进门收费管理-收费单标记" | |
15 | 15 | |
16 | 16 | @classmethod |
17 | 17 | def setUpClass(cls): |
... | ... | @@ -30,7 +30,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
30 | 30 | replace("type=1", "type={}".format(self.data[5])).\ |
31 | 31 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
32 | 32 | replace("companyId=9", "companyId={}".format(self.data[8])) |
33 | - re=sy1.get(url=url,headers=en.header) | |
33 | + re=heb.get(url=url,headers=en.header) | |
34 | 34 | print(re.json()) |
35 | 35 | self.assertEqual(re.status_code, 200) |
36 | 36 | self.assertTrue("'total':1" in str(re.json()).replace(" ","")) |
... | ... | @@ -49,7 +49,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
49 | 49 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
50 | 50 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
51 | 51 | replace("attr=number", "attr=likePlate") |
52 | - re=sy1.get(url=url,headers=en.header) | |
52 | + re=heb.get(url=url,headers=en.header) | |
53 | 53 | print(re.json()) |
54 | 54 | self.assertEqual(re.status_code, 200) |
55 | 55 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) |
... | ... | @@ -67,7 +67,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
67 | 67 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
68 | 68 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
69 | 69 | replace("attr=number", "attr=goods") |
70 | - re=sy1.get(url=url,headers=en.header) | |
70 | + re=heb.get(url=url,headers=en.header) | |
71 | 71 | print(re.json()) |
72 | 72 | self.assertEqual(re.status_code, 200) |
73 | 73 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) |
... | ... | @@ -85,7 +85,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
85 | 85 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
86 | 86 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
87 | 87 | replace("attr=number", "attr=pay") |
88 | - re=sy1.get(url=url,headers=en.header) | |
88 | + re=heb.get(url=url,headers=en.header) | |
89 | 89 | print(re.json()) |
90 | 90 | self.assertEqual(re.status_code, 200) |
91 | 91 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) |
... | ... | @@ -103,7 +103,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
103 | 103 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
104 | 104 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
105 | 105 | replace("attr=number", "attr=cname") |
106 | - re=sy1.get(url=url,headers=en.header) | |
106 | + re=heb.get(url=url,headers=en.header) | |
107 | 107 | print(re.json()) |
108 | 108 | self.assertEqual(re.status_code, 200) |
109 | 109 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) |
... | ... | @@ -121,7 +121,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
121 | 121 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
122 | 122 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
123 | 123 | replace("attr=number", "attr=ic") |
124 | - re=sy1.get(url=url,headers=en.header) | |
124 | + re=heb.get(url=url,headers=en.header) | |
125 | 125 | print(re.json()) |
126 | 126 | self.assertEqual(re.status_code, 200) |
127 | 127 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) |
... | ... | @@ -139,7 +139,7 @@ class test_entranceFeeBill_details(unittest.TestCase): |
139 | 139 | replace("backSkinStatus=-1", "backSkinStatus={}".format(self.data[6])).\ |
140 | 140 | replace("companyId=9", "companyId={}".format(self.data[8])).\ |
141 | 141 | replace("attr=number", "attr=phone") |
142 | - re=sy1.get(url=url,headers=en.header) | |
142 | + re=heb.get(url=url,headers=en.header) | |
143 | 143 | print(re.json()) |
144 | 144 | self.assertEqual(re.status_code, 200) |
145 | 145 | self.assertTrue("'number':'{}'".format(self.data[9]) in str(re.json()).replace(" ","")) | ... | ... |
testcase/heb/entranceFeeBill_proves/test_entranceFeeBill_provesPage.py
... | ... | @@ -4,14 +4,14 @@ import unittest |
4 | 4 | import urllib3 |
5 | 5 | from commons import ConfigDB as db |
6 | 6 | from commons import common as com |
7 | -from commons.MySession import my,sy1 | |
7 | +from commons.MySession import my,heb | |
8 | 8 | from commons.api.entranceFeeBill_provesPage import entranceFeeBill_provesPage |
9 | 9 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
10 | 10 | en=entranceFeeBill_provesPage() |
11 | 11 | |
12 | 12 | |
13 | 13 | class test_entranceFeeBill_provesPage(unittest.TestCase): |
14 | - "进门收费管理-证明类型明细" | |
14 | + "哈尔滨市场-进门收费管理-证明类型明细" | |
15 | 15 | |
16 | 16 | @classmethod |
17 | 17 | def setUpClass(cls): |
... | ... | @@ -27,7 +27,7 @@ class test_entranceFeeBill_provesPage(unittest.TestCase): |
27 | 27 | replace("雪莲果", self.data[11]).replace("14158", str(self.data[10])). |
28 | 28 | replace("103", str(self.data[0]))).replace("1621",str(self.data[8]))).replace( |
29 | 29 | "companyId=9","companyId={}".format(str(self.data[6]))) |
30 | - re=sy1.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
30 | + re=heb.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
31 | 31 | print(re.json()) |
32 | 32 | self.assertEqual(re.status_code, 200) |
33 | 33 | self.assertTrue("'total':1" in str(re.json()).replace(" ","")) |
... | ... | @@ -44,7 +44,7 @@ class test_entranceFeeBill_provesPage(unittest.TestCase): |
44 | 44 | replace("103", str(self.data[0]))). |
45 | 45 | replace("1621",str(self.data[8]))).\ |
46 | 46 | replace("companyId=9","companyId={}".format(str(self.data[6]))) |
47 | - re=sy1.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
47 | + re=heb.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
48 | 48 | print(re.json()) |
49 | 49 | self.assertEqual(re.status_code, 200) |
50 | 50 | self.assertTrue("'number':'{}'".format(self.data[1]) in str(re.json()).replace(" ","")) |
... | ... | @@ -60,7 +60,7 @@ class test_entranceFeeBill_provesPage(unittest.TestCase): |
60 | 60 | replace("103", str(self.data[0]))). |
61 | 61 | replace("1621",str(self.data[8]))).\ |
62 | 62 | replace("companyId=9","companyId={}".format(str(self.data[6]))) |
63 | - re=sy1.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
63 | + re=heb.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
64 | 64 | print(re.json()) |
65 | 65 | self.assertEqual(re.status_code, 200) |
66 | 66 | self.assertTrue("'number':'{}'".format(self.data[1]) in str(re.json()).replace(" ","")) |
... | ... | @@ -76,7 +76,7 @@ class test_entranceFeeBill_provesPage(unittest.TestCase): |
76 | 76 | replace("103", str(self.data[0]))). |
77 | 77 | replace("1621",str(self.data[8]))).\ |
78 | 78 | replace("companyId=9","companyId={}".format(str(self.data[6]))) |
79 | - re=sy1.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
79 | + re=heb.post(url=en.url,headers=en.header,data=body.encode("utf-8")) | |
80 | 80 | print(re.json()) |
81 | 81 | self.assertEqual(re.status_code, 200) |
82 | 82 | self.assertTrue("'number':'{}'".format(self.data[1]) in str(re.json()).replace(" ","")) |
... | ... | @@ -92,7 +92,7 @@ class test_entranceFeeBill_provesPage(unittest.TestCase): |
92 | 92 | replace("103", str(self.data[0]))). |
93 | 93 | replace("1621", str(self.data[8]))). \ |
94 | 94 | replace("companyId=9", "companyId={}".format(str(self.data[6]))) |
95 | - re = sy1.post(url=en.url, headers=en.header, data=body.encode("utf-8")) | |
95 | + re = heb.post(url=en.url, headers=en.header, data=body.encode("utf-8")) | |
96 | 96 | print(re.json()) |
97 | 97 | self.assertEqual(re.status_code, 200) |
98 | 98 | self.assertTrue("'number':'{}'".format(self.data[1]) in str(re.json()).replace(" ", "")) | ... | ... |
testcase/heb/weightBizBill/test_weighingServiceSave.py
... | ... | @@ -3,17 +3,17 @@ |
3 | 3 | import unittest |
4 | 4 | import urllib3 |
5 | 5 | from commons import common as com |
6 | -from commons.MySession import my,sy1 | |
6 | +from commons.MySession import my,heb | |
7 | 7 | from commons.api.weighingServiceSave import weighingServiceSave |
8 | 8 | from commons.basic.listCarType import listCarType |
9 | 9 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
10 | -we=weighingServiceSave(sy1) | |
11 | -li=listCarType(sy1) | |
10 | +we=weighingServiceSave(heb) | |
11 | +li=listCarType(heb) | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | 15 | class test_weighingServiceSave(unittest.TestCase): |
16 | - "称重服务" | |
16 | + "哈尔滨市场-称重服务" | |
17 | 17 | |
18 | 18 | @classmethod |
19 | 19 | def setUpClass(cls): |
... | ... | @@ -30,7 +30,7 @@ class test_weighingServiceSave(unittest.TestCase): |
30 | 30 | body["carTypeId"]=car[0]["id"] |
31 | 31 | body["carTypeName"]=car[0]["carTypeName"] |
32 | 32 | body["carTypeCode"]=car[0]["code"] |
33 | - re=sy1.post(url=we.url,headers=we.header,json=body) | |
33 | + re=heb.post(url=we.url,headers=we.header,json=body) | |
34 | 34 | print(re.json()) |
35 | 35 | self.assertEqual(re.status_code, 200) |
36 | 36 | self.assertTrue("'message':'交费成功','result':'交费成功','success':True" in str(re.json()).replace(" ","")) | ... | ... |
testcase/sy/CZFW/test_weightBizBill_doRefund.py
testcase/sy/CZFW/test_weightBizBill_listPage.py
testcase/sy/entranceFeeBill_detail/test_entranceFeeBill_details.py
testcase/sy/entranceFeeBill_proves/test_entranceFeeBill_provesPage.py