Commit b7f4397012b2ef45b79f931a4320d5e91ddfd510

Authored by wenleiming
1 parent 9b595b0e

明名

testcase/FeedbackCustomerController/fc_add.py renamed to testcase/FeedbackCustomerController/test_fc_add.py
... ... @@ -23,6 +23,7 @@ class test_fc_add(unittest.TestCase):
23 23 print(re.headers)
24 24 print(re.json())
25 25 self.assertTrue("操作成功" in str(re.json()))
  26 + return re
26 27  
27 28 @classmethod
28 29 def tearDownClass(cls):
... ...
testcase/FeedbackCustomerController/fc_edit.py renamed to testcase/FeedbackCustomerController/test_fc_edit.py
testcase/FeedbackCustomerController/feedback_customer_disable.py renamed to testcase/FeedbackCustomerController/test_feedback_customer_disable.py
... ... @@ -6,7 +6,7 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 fcd = feedback_customer_disable()
7 7 import commons.ConfigDB as db
8 8  
9   -class test_fc_add(unittest.TestCase):
  9 +class test_feedback_customer_disable(unittest.TestCase):
10 10 "返还人禁用"
11 11 @classmethod
12 12 def setUpClass(cls):
... ... @@ -16,7 +16,7 @@ class test_fc_add(unittest.TestCase):
16 16 self.id = db.mysql_selectOne("SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '1' ORDER BY `id` DESC LIMIT 1")[0]
17 17 print("查询出返还人id", self.id)
18 18  
19   - def test_fc_add_01(self):
  19 + def test_feedback_customer_disable_01(self):
20 20 url = fcd.url.replace("44", str(self.id))
21 21 re = sy1.post(url=url, headers=fcd.header)
22 22 print(re.headers)
... ...
testcase/FeedbackCustomerController/feedback_customer_enable.py renamed to testcase/FeedbackCustomerController/test_feedback_customer_enable.py
... ... @@ -6,7 +6,7 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
6 6 fce = feedback_customer_enable()
7 7 import commons.ConfigDB as db
8 8  
9   -class test_fc_add(unittest.TestCase):
  9 +class test_feedback_customer_enable(unittest.TestCase):
10 10 "返还人启用"
11 11 @classmethod
12 12 def setUpClass(cls):
... ... @@ -15,7 +15,7 @@ class test_fc_add(unittest.TestCase):
15 15 def setUp(self):
16 16 self.id = db.mysql_selectOne("SELECT * FROM `dili_jmsf`.`feedback_customer` WHERE `status` = '2' ORDER BY `id` DESC LIMIT 1")[0]
17 17 print(self.id)
18   - def test_fc_add_01(self):
  18 + def test_feedback_customer_enable_01(self):
19 19  
20 20 url = fce.url.replace("49",str(self.id))
21 21 re = sy1.post(url = url, headers = fce.header)
... ...
testcase/FeedbackCustomerController/feedback_customer_query.py renamed to testcase/FeedbackCustomerController/test_feedback_customer_query.py
testcase/FeedbackOrderController/test_feedback_order_settlement.py 0 → 100644
  1 +import unittest
  2 +import urllib3
  3 +from commons.MySession import my,sy1
  4 +from commons.api.feedback_order_settlement import feedback_order_settlement
  5 +urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  6 +from commons.api.feedback_order_settlement_query import feedback_order_settlement_query
  7 +fosq = feedback_order_settlement_query()
  8 +
  9 +fos = feedback_order_settlement()
  10 +
  11 +class test_feedback_order_settlement(unittest.TestCase):
  12 + "结账管理——结账"
  13 + @classmethod
  14 + def setUpClass(cls):
  15 + pass
  16 +
  17 + def setUp(self):
  18 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").replace("2021-07-22 00:00:00", "\
  19 + 2021-07-03 00:00:00").replace("2021-08-03 23:59:59","2021-08-03 23:59:59")
  20 + re = sy1.post(url=fosq.url, data=body, headers=fosq.header, proxies=my.myproxies)
  21 + Amount = re.json()["rows"][0]["unsettledAmount"]
  22 + ids = re.json()["rows"][0]["id"]
  23 + billIds = re.json()["rows"][0]["billId"]
  24 + return Amount, ids, billIds
  25 +
  26 + def test_feedback_order_settlement_01(self):
  27 + body = fos.body.replace("id=25","id=25").replace("888810057654","888810057654").replace("settleAmount=2","settleAmount=2").\
  28 + replace("ids=12034","ids=11953").\
  29 + replace("feedbackCustomerId=25","feedbackCustomerId=25").\
  30 + replace("feedbackCustomerName=验证员工推送到CRM","feedbackCustomerName=验证员工推送到CRM").\
  31 + replace("billIds=3621","billIds=3493").\
  32 + replace("settledAmounts=2","settledAmounts=2")
  33 +
  34 + print(body)
  35 + re = sy1.post(url = fos.url, headers = fos.header, data = body.encode('utf-8'))
  36 + print(re.headers)
  37 +
  38 + print(re.json())
  39 + self.assertTrue("操作成功" in str(re.json()))
  40 + return re
  41 +
  42 + @classmethod
  43 + def tearDownClass(cls):
  44 + pass
  45 +
  46 +
  47 +if __name__ == '__main__':
  48 + unittest.main()
... ...
testcase/FeedbackOrderController/feedback_order_settlement_query.py renamed to testcase/FeedbackOrderController/test_feedback_order_settlement_query.py
... ... @@ -13,14 +13,14 @@ class test_feedback_order_settlement_query(unittest.TestCase):
13 13  
14 14 def test_feedback_order_settlement_query_01(self):
15 15 print(fosq.url)
16   - body = fosq.body.replace("25", "16").replace("2021-07-22 00:00:00", "\
  16 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").replace("2021-07-22 00:00:00", "\
17 17 2021-07-03 00:00:00").replace("2021-08-03 23:59:59", "2021-08-03 23:59:59")
18 18  
19   -
20 19 re = sy1.post(url = fosq.url, data = body,headers = fosq.header,proxies=my.myproxies)
21 20 print(re.headers)
22 21 print(re.json())
23 22 self.assertTrue("新爱心园婚介所的总公司" in str(re.json()))
  23 + return re
24 24  
25 25 @classmethod
26 26 def tearDownClass(cls):
... ...
testcase/feedbackAccounrecordController_list/feedbackAccounrecordController_list.py renamed to testcase/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
testcase/feedbackOrderController_settlementlist/feedbackOrderController_settlementlist.py renamed to testcase/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py