Commit 1405d10a2590bdb2224c99b148529e1c973c7e27

Authored by wenleiming
1 parent 906f9edf

修改参数

testcase/heb/FeedbackCustomerController/test_feedback_customer_enable.py renamed to testcase/heb/feedbackCustomerController/test_feedback_customer_enable.py
testcase/heb/FeedbackCustomerController/test_feedback_customer_query.py renamed to testcase/heb/feedbackCustomerController/test_feedback_customer_query.py
testcase/heb/FeedbackOrderController/test_feedback_order_settlement.py renamed to testcase/heb/feedbackOrderController/test_feedback_order_settlement.py
testcase/heb/FeedbackOrderController/test_feedback_order_settlement_query.py renamed to testcase/heb/feedbackOrderController/test_feedback_order_settlement_query.py
testcase/sy/FeedbackCustomerController/test_feedback_customer_enable.py renamed to testcase/sy/feedbackCustomerController/test_feedback_customer_enable.py
testcase/sy/FeedbackCustomerController/test_feedback_customer_query.py renamed to testcase/sy/feedbackCustomerController/test_feedback_customer_query.py
testcase/sy/FeedbackOrderController/test_feedback_order_settlement.py renamed to testcase/sy/feedbackOrderController/test_feedback_order_settlement.py
testcase/sy/FeedbackOrderController/test_feedback_order_settlement_query.py renamed to testcase/sy/feedbackOrderController/test_feedback_order_settlement_query.py
... ... @@ -4,6 +4,7 @@ from commons.MySession import my,sy1
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()
  7 +import commons.ConfigDB as db
7 8 import datetime
8 9  
9 10 """
... ... @@ -15,17 +16,20 @@ class test_feedback_order_settlement_query(unittest.TestCase):
15 16 @classmethod
16 17 def setUpClass(cls):
17 18 pass
18   -
  19 + def setUp(self):
  20 + self.ids = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE
  21 + `status` = '1' and market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + '''
  22 + ORDER BY `id` DESC LIMIT 1''')[0]
19 23 def test_feedback_order_settlement_query_01(self):
20 24 "根据返还人和缴费时间进行查询"
21 25 print(fosq.url)
22   - body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId=16").\
  26 + body = fosq.body.replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.ids)).\
23 27 replace("2021-07-22 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
24 28 replace("2021-08-03 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"))
25   - # print(body)
  29 + print(body)
26 30 re = sy1.post(url = fosq.url, data = body,headers = fosq.header)
27   - # print(re.headers)
28   - # print(re.json())
  31 + print(re.headers)
  32 + print(re.json())
29 33 self.assertTrue("rows" in str(re.json()))
30 34  
31 35 @classmethod
... ...
testcase/sy/feedbackOrderController_settlementlist/test_feedbackOrderController_settlementlist.py
... ... @@ -17,17 +17,19 @@ class test_feedbackOrderController_settlementlist(unittest.TestCase):
17 17 def setUpClass(cls):
18 18 pass
19 19 def setUp(self):
20   - pass
  20 + self.idf = db.mysql_selectOne('''SELECT id FROM `dili_jmsf`.`feedback_customer` WHERE
  21 + `status` = '1' and market_id = ''' + str(sy1.user["sy_user01"]["firmId"]) + '''
  22 + ORDER BY `id` DESC LIMIT 1''')[0]
21 23  
22 24 def test_feedbackOrderController_settlementlist_01(self):
23 25 "根据返还人和结算时间进行查询"
24 26 body = focsl.body.replace("2021-08-04 00:00:00", (datetime.datetime.now() - datetime.timedelta(days = 30)).strftime("%Y-%m-%d %H:%M:%S")).\
25 27 replace("2021-08-05 23:59:59", datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")).\
26   - replace("feedbackCustomerId=25", "feedbackCustomerId=26")
27   - # print(body)
28   - re = sy1.post(url=focsl.url, data=body, headers=focsl.header)
  28 + replace("feedbackCustomerId=25", "feedbackCustomerId="+str(self.idf))
  29 + print(body)
  30 + re = sy1.post(url=focsl.url, data=body.replace("\n",""), headers=focsl.header,proxies = my.proxies)
29 31 self.assertEqual(re.status_code, 200)
30   - # print(re.json())
  32 + print(re.json())
31 33  
32 34 @classmethod
33 35 def tearDownClass(cls):
... ...