Commit 1c1cfce376eac971337367a6694d87ffcceb976a

Authored by wenleiming
1 parent 4ca12d0d

修改方法

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