Commit 1c1cfce376eac971337367a6694d87ffcceb976a
1 parent
4ca12d0d
修改方法
Showing
11 changed files
with
33 additions
and
33 deletions
testcase/heb/FeedbackCustomerController/test_fc_add.py
... | ... | @@ -19,7 +19,7 @@ class test_fc_add(unittest.TestCase): |
19 | 19 | pass |
20 | 20 | def setUp(self): |
21 | 21 | self.cardnb = db.mysql_selectOne('''SELECT card_no FROM `dili_account`.`account_user_card` WHERE state = 1 |
22 | - AND firm_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY id LIMIT 1''')[0] | |
22 | + AND firm_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY id LIMIT 1''')[0] | |
23 | 23 | def test_fc_add_01(self): |
24 | 24 | "新增返还人" |
25 | 25 | body = fc.body.replace("18828281176",ra.phone_number()).\ |
... | ... | @@ -31,7 +31,7 @@ class test_fc_add(unittest.TestCase): |
31 | 31 | # replace("relationCardTemp=888810054630", "relationCardTemp=888810054630"). \ |
32 | 32 | # replace("relationalCard[0].cardNumber=888810054630", "relationalCard[0].cardNumber=888810054630") |
33 | 33 | # print(body) |
34 | - re = sy1.post(url=fc.url, headers=fc.header, data=body.encode('utf-8')) | |
34 | + re = heb.post(url=fc.url, headers=fc.header, data=body.encode('utf-8')) | |
35 | 35 | # print(re.headers) |
36 | 36 | print(re.json()) |
37 | 37 | self.assertTrue("操作成功" in str(re.json())) | ... | ... |
testcase/heb/FeedbackCustomerController/test_fc_edit.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.fc_edit import fc_edit |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | from commons.Faker import random_data |
... | ... | @@ -29,9 +29,9 @@ class test_fc_edit(unittest.TestCase): |
29 | 29 | # # replace("relationCardTemp=888810054630", "relationCardTemp=888810054630"). \ |
30 | 30 | # # replace("relationalCard[0].cardNumber=888810054630", "relationalCard[0].cardNumber=888810054630") |
31 | 31 | # # print(body) |
32 | - # re = sy1.post(url = fc.url, headers = fc.header, data = body.encode('utf-8'), proxies = my.proxies) | |
32 | + # re = heb.post(url = fc.url, headers = fc.header, data = body.encode('utf-8'), proxies = my.proxies) | |
33 | 33 | self.mesg = db.mysql_selectOne('''SELECT id,name,mobile,card_number |
34 | -FROM `dili_jmsf`.`feedback_customer` WHERE market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''') | |
34 | +FROM `dili_jmsf`.`feedback_customer` WHERE market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''') | |
35 | 35 | # print(self.mesg) |
36 | 36 | def test_fc_edit_01(self): |
37 | 37 | "修改返还人" |
... | ... | @@ -45,7 +45,7 @@ FROM `dili_jmsf`.`feedback_customer` WHERE market_id = '''+str(sy1.user["sy_use |
45 | 45 | # replace("888810054630", str(self.mesg[3])). \ |
46 | 46 | # replace("relationalCard[0].cardNumber=210720131533", "relationalCard[0].cardNumber=210720125142") |
47 | 47 | # print(body) |
48 | - re = sy1.post(url=fc.url, headers=fc.header, data=body.encode('utf-8')) | |
48 | + re = heb.post(url=fc.url, headers=fc.header, data=body.encode('utf-8')) | |
49 | 49 | # print(re.headers) |
50 | 50 | # print(re.json()) |
51 | 51 | self.assertTrue("操作成功" in str(re.json())) | ... | ... |
testcase/heb/FeedbackCustomerController/test_fc_view.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | 3 | import commons.ConfigDB as db |
4 | -from commons.MySession import my,sy1 | |
4 | +from commons.MySession import my,heb | |
5 | 5 | from commons.api.fc_view import fc_view |
6 | 6 | from commons.api.fc_add import fc_add |
7 | 7 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
... | ... | @@ -22,7 +22,7 @@ class test_fc_view(unittest.TestCase): |
22 | 22 | def setUp(self): |
23 | 23 | # 获取数据:从MYSQL获取新增返还人的id号 |
24 | 24 | self.code = db.mysql_selectOne('''SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE |
25 | - market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] | |
25 | + market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] | |
26 | 26 | |
27 | 27 | |
28 | 28 | # @unittest.case_mark(my.mark()) |
... | ... | @@ -32,7 +32,7 @@ class test_fc_view(unittest.TestCase): |
32 | 32 | url = vi.url.replace("40", str(self.code)) |
33 | 33 | # print("数据处理后的url", url) |
34 | 34 | # 进行GET请求 |
35 | - re = sy1.get(url=url, headers=vi.header) | |
35 | + re = heb.get(url=url, headers=vi.header) | |
36 | 36 | # 打印请求结果(可删除该代码,一般只在调试时使用) |
37 | 37 | # print(re.text) |
38 | 38 | # 断言响应数据中是否存在期望字符串 | ... | ... |
testcase/heb/FeedbackCustomerController/test_feedback_customer_disable.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedback_customer_disable import feedback_customer_disable |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | fcd = feedback_customer_disable() |
... | ... | @@ -18,14 +18,14 @@ class test_feedback_customer_disable(unittest.TestCase): |
18 | 18 | |
19 | 19 | def setUp(self): |
20 | 20 | self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` |
21 | - WHERE `status` = '1' and market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' | |
21 | + WHERE `status` = '1' and market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' | |
22 | 22 | ORDER BY `id` DESC LIMIT 1''')[0] |
23 | 23 | # print("查询出返还人id", self.id) |
24 | 24 | |
25 | 25 | def test_feedback_customer_disable_01(self): |
26 | 26 | "返还人禁用" |
27 | 27 | url = fcd.url.replace("44", str(self.ids)) |
28 | - re = sy1.post(url=url, headers=fcd.header) | |
28 | + re = heb.post(url=url, headers=fcd.header) | |
29 | 29 | # print(re.headers) |
30 | 30 | # print(re.json()) |
31 | 31 | self.assertTrue("操作成功" in str(re.json())) | ... | ... |
testcase/heb/FeedbackCustomerController/test_feedback_customer_enable.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedback_customer_enable import feedback_customer_enable |
5 | 5 | from commons.api.feedback_customer_disable import feedback_customer_disable |
6 | 6 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
... | ... | @@ -21,12 +21,12 @@ class test_feedback_customer_enable(unittest.TestCase): |
21 | 21 | def setUp(self): |
22 | 22 | self.ids = db.mysql_selectOne(''' |
23 | 23 | SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' and |
24 | - market_id='''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] | |
24 | + market_id='''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY `id` DESC LIMIT 1''')[0] | |
25 | 25 | print(self.ids) |
26 | 26 | def test_feedback_customer_enable_01(self): |
27 | 27 | "返还人启用" |
28 | 28 | url = fce.url.replace("49",str(self.ids)) |
29 | - re = sy1.post(url = url, headers = fce.header) | |
29 | + re = heb.post(url = url, headers = fce.header) | |
30 | 30 | # print(fce.url) |
31 | 31 | # print(re.headers) |
32 | 32 | # print(re.json()) | ... | ... |
testcase/heb/FeedbackCustomerController/test_feedback_customer_query.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedback_customer_query import feedback_customer_query |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | import datetime |
... | ... | @@ -18,7 +18,7 @@ class test_feedback_customer_query(unittest.TestCase): |
18 | 18 | pass |
19 | 19 | def setUp(self): |
20 | 20 | self.name1 = db.mysql_selectOne('''SELECT name FROM `dili_jmsf`.`feedback_customer` |
21 | - WHERE market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + ''' ORDER BY `id` DESC LIMIT 1''')[0] | |
21 | + WHERE market_id = ''' + str(heb.user["sy_user01"]["firmId"]) + ''' ORDER BY `id` DESC LIMIT 1''')[0] | |
22 | 22 | def test_feedback_customer_query_01(self): |
23 | 23 | "返还人列表查询" |
24 | 24 | print(fcq.url) |
... | ... | @@ -27,7 +27,7 @@ class test_feedback_customer_query(unittest.TestCase): |
27 | 27 | .replace("2021-08-11 00:00:00",(datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ |
28 | 28 | replace("2021-08-11 23:59:59",datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) |
29 | 29 | # print(body) |
30 | - re = sy1.post(url = fcq.url, data = body.replace("\n","").encode('utf-8'),headers = fcq.header) | |
30 | + re = heb.post(url = fcq.url, data = body.replace("\n","").encode('utf-8'),headers = fcq.header) | |
31 | 31 | # print(re.headers) |
32 | 32 | # print(re.text) |
33 | 33 | # print("士大夫十",str(self.name1)) | ... | ... |
testcase/heb/FeedbackOrderController/test_feedback_order_settlement.py
1 | 1 | import json |
2 | 2 | import unittest |
3 | 3 | import urllib3 |
4 | -from commons.MySession import my,sy1 | |
4 | +from commons.MySession import my,heb | |
5 | 5 | from commons.api.feedback_order_settlement import feedback_order_settlement |
6 | 6 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
7 | 7 | from commons.api.feedback_order_settlement_query import feedback_order_settlement_query |
... | ... | @@ -22,7 +22,7 @@ class test_feedback_order_settlement(unittest.TestCase): |
22 | 22 | def setUp(self): |
23 | 23 | body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").replace("2021-07-22 00:00:00", "\ |
24 | 24 | 2021-07-03 00:00:00").replace("2021-08-03 23:59:59", str(datetime.datetime.now())) |
25 | - re = sy1.post(url = fosq.url, data = body, headers = fosq.header) | |
25 | + re = heb.post(url = fosq.url, data = body, headers = fosq.header) | |
26 | 26 | |
27 | 27 | self.Amount = re.json()["rows"][0]["unsettledAmount"] |
28 | 28 | self.ids = re.json()["rows"][0]["id"] |
... | ... | @@ -35,7 +35,7 @@ class test_feedback_order_settlement(unittest.TestCase): |
35 | 35 | "Content-Type": "application/x-www-form-urlencoded;charset=UTF-8" |
36 | 36 | } |
37 | 37 | body = "customerId=16" |
38 | - re2 = sy1.post(url = url,headers = header,data = body) | |
38 | + re2 = heb.post(url = url,headers = header,data = body) | |
39 | 39 | self.idd = re2.json()["id"] |
40 | 40 | self.name = re2.json()["name"] |
41 | 41 | self.cardNumber = re2.json()["cardNumber"] |
... | ... | @@ -52,7 +52,7 @@ class test_feedback_order_settlement(unittest.TestCase): |
52 | 52 | replace("billIds=3621","billIds="+str(self.billIds)).\ |
53 | 53 | replace("settledAmounts=2","settledAmounts="+str(self.Amount)) |
54 | 54 | # print(body) |
55 | - re = sy1.post(url = fos.url, headers = fos.header, data = body.encode('utf-8')) | |
55 | + re = heb.post(url = fos.url, headers = fos.header, data = body.encode('utf-8')) | |
56 | 56 | # print(re.headers) |
57 | 57 | |
58 | 58 | # print(re.json()) | ... | ... |
testcase/heb/FeedbackOrderController/test_feedback_order_settlement_query.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedback_order_settlement_query import feedback_order_settlement_query |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | fosq = feedback_order_settlement_query() |
... | ... | @@ -23,7 +23,7 @@ class test_feedback_order_settlement_query(unittest.TestCase): |
23 | 23 | replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ |
24 | 24 | replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) |
25 | 25 | # print(body) |
26 | - re = sy1.post(url = fosq.url, data = body,headers = fosq.header) | |
26 | + re = heb.post(url = fosq.url, data = body,headers = fosq.header) | |
27 | 27 | # print(re.headers) |
28 | 28 | # print(re.json()) |
29 | 29 | self.assertTrue("rows" in str(re.json())) | ... | ... |
testcase/heb/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedbackAccounrecordController_list import feedbackAccounrecordController_list |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | import commons.ConfigDB as db |
... | ... | @@ -14,13 +14,13 @@ class test_feedbackAccounrecordController_list(unittest.TestCase): |
14 | 14 | "交易明细——根据交易时间和交易流水号查询" |
15 | 15 | @classmethod |
16 | 16 | def setUpClass(cls): |
17 | - print(sy1.user["sy_user01"]["firmId"]) | |
17 | + print(heb.user["sy_user01"]["firmId"]) | |
18 | 18 | pass |
19 | 19 | def setUp(self): |
20 | 20 | self.body = db.mysql_selectOne( |
21 | 21 | '''SELECT dili_jmsf.feedback_account_record.created,dili_jmsf.feedback_order.record_number |
22 | 22 | FROM `dili_jmsf`.`feedback_order` LEFT JOIN `dili_jmsf`.`feedback_account_record` ON dili_jmsf.feedback_order.id = dili_jmsf.feedback_account_record.order_ids |
23 | -WHERE market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''') | |
23 | +WHERE market_id = '''+str(heb.user["sy_user01"]["firmId"])+''' ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''') | |
24 | 24 | # print("查询出查询时间和交易流水号:", self.body[0],self.body[1]) |
25 | 25 | |
26 | 26 | def test_feedbackAccounrecordController_list_01(self): |
... | ... | @@ -29,7 +29,7 @@ WHERE market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY dili_jms |
29 | 29 | replace("2021-08-05 23:59:59", str(self.body[0])).\ |
30 | 30 | replace("1075782308694007808", self.body[1]) |
31 | 31 | |
32 | - re = sy1.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies) | |
32 | + re = heb.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies) | |
33 | 33 | # print(re.headers) |
34 | 34 | # print(re.json()) |
35 | 35 | self.assertTrue(self.body[1] in str(re.json())) |
... | ... | @@ -40,7 +40,7 @@ WHERE market_id = '''+str(sy1.user["sy_user01"]["firmId"])+''' ORDER BY dili_jms |
40 | 40 | replace("2021-08-05 23:59:59", str(self.body[0])).\ |
41 | 41 | replace("1075782308694007808", "") |
42 | 42 | |
43 | - re = sy1.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies) | |
43 | + re = heb.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies) | |
44 | 44 | # print(re.headers) |
45 | 45 | # print(re.json()) |
46 | 46 | self.assertTrue(str(self.body[0]) in str(re.json())) | ... | ... |
testcase/heb/feedbackOrderController_settlementlist/feedbackOrderController_querySumAmount.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import sy1 | |
3 | +from commons.MySession import heb | |
4 | 4 | from commons.api.feedbackOrderController_querySumAmount import querySumAmount |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | import datetime |
... | ... | @@ -23,7 +23,7 @@ class test_feedbackOrderController_querySumAmount(unittest.TestCase): |
23 | 23 | body = qsa.body.replace("2021-07-05 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\ |
24 | 24 | replace("2021-08-05 09:46:25", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")) |
25 | 25 | |
26 | - re = sy1.post(url=qsa.url, data=body, headers=qsa.header) | |
26 | + re = heb.post(url=qsa.url, data=body, headers=qsa.header) | |
27 | 27 | self.assertEqual(re.status_code, 200) |
28 | 28 | # print(re.json()) |
29 | 29 | ... | ... |
testcase/heb/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
1 | 1 | import unittest |
2 | 2 | import urllib3 |
3 | -from commons.MySession import my,sy1 | |
3 | +from commons.MySession import my,heb | |
4 | 4 | from commons.api.feedbackOrderController_settlementlist import feedbackOrderController_settlementlist |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | 6 | import commons.ConfigDB as db |
... | ... | @@ -25,7 +25,7 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase): |
25 | 25 | replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\ |
26 | 26 | replace("feedbackCustomerId=25", "feedbackCustomerId=26") |
27 | 27 | # print(body) |
28 | - re = sy1.post(url=focsl.url, data=body, headers=focsl.header) | |
28 | + re = heb.post(url=focsl.url, data=body, headers=focsl.header) | |
29 | 29 | self.assertEqual(re.status_code, 200) |
30 | 30 | # print(re.json()) |
31 | 31 | ... | ... |