Commit 919d44d54ed36bef2db7fc63e455f71d746cbc75

Authored by wenleiming
1 parent 9185a6dc

添加备注

commons/api/feedbackAccounrecordController_list.py
@@ -32,14 +32,16 @@ class feedbackAccounrecordController_list(): @@ -32,14 +32,16 @@ class feedbackAccounrecordController_list():
32 # &queryType=1 32 # &queryType=1
33 # &keyword=1075782308694007808''' 33 # &keyword=1075782308694007808'''
34 # body = '''rows=10&page=1&order=desc&metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}&metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}&metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}&metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}&createdStart=2021-08-05 00:00:00&createdEnd=2021-08-05 23:59:59&queryType=1&keyword=1075782308694007808''' 34 # body = '''rows=10&page=1&order=desc&metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}&metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}&metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}&metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}&createdStart=2021-08-05 00:00:00&createdEnd=2021-08-05 23:59:59&queryType=1&keyword=1075782308694007808'''
35 - body = '''rows=10&  
36 - page=1&order=desc&  
37 - metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}&  
38 - metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}&  
39 - metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}&  
40 - metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}&  
41 - createdStart=2021-08-05 00:00:00&  
42 - createdEnd=2021-08-05 23:59:59&queryType=1&keyword=1075782308694007808''' 35 + body = '''rows=10
  36 + &page=1&order=desc
  37 + &metadata[created]={"provider":"datetimeProvider","index":10,"field":"created"}
  38 + &metadata[recordType]={"provider":"recordTypeProvider","index":20,"field":"recordType"}
  39 + &metadata[recordState]={"provider":"recordStateProvider","index":30,"field":"recordState"}
  40 + &metadata[recordAmount]={"provider":"moneyProvider","index":40,"field":"recordAmount"}
  41 + &createdStart=2021-08-05 00:00:00
  42 + &createdEnd=2021-08-05 23:59:59
  43 + &queryType=1
  44 + &keyword=1075782308694007808'''
43 45
44 def __init__(self): 46 def __init__(self):
45 self.url = feedbackAccounrecordController_list.url.replace("http://test.",com.get_global_config("global_data", "environment", "en")) 47 self.url = feedbackAccounrecordController_list.url.replace("http://test.",com.get_global_config("global_data", "environment", "en"))
testcase/feedbackAccounrecordController_list/test_feedbackAccounrecordController_list.py
@@ -21,19 +21,29 @@ class test_feedbackAccounrecordController_list(unittest.TestCase): @@ -21,19 +21,29 @@ class test_feedbackAccounrecordController_list(unittest.TestCase):
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(sy1.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):
27 - "根据交易时间和交易流水号查询" 27 + "根据交易时间和交易流水号查询交易明细"
28 body = farcl.body.replace("2021-08-05 00:00:00", str(self.body[0])).\ 28 body = farcl.body.replace("2021-08-05 00:00:00", str(self.body[0])).\
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,headers = farcl.header)  
33 - print(re.headers)  
34 - print(re.json()) 32 + re = sy1.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies)
  33 + # print(re.headers)
  34 + # print(re.json())
35 self.assertTrue(self.body[1] in str(re.json())) 35 self.assertTrue(self.body[1] in str(re.json()))
36 - return re 36 +
  37 + def test_feedbackAccounrecordController_list_02(self):
  38 + "根据交易时间查询交易明细"
  39 + body = farcl.body.replace("2021-08-05 00:00:00", str(self.body[0])).\
  40 + replace("2021-08-05 23:59:59", str(self.body[0])).\
  41 + replace("1075782308694007808", "")
  42 +
  43 + re = sy1.post(url = farcl.url, data = body.replace("\n",""),headers = farcl.header,proxies = my.proxies)
  44 + # print(re.headers)
  45 + # print(re.json())
  46 + self.assertTrue(str(self.body[0]) in str(re.json()))
37 47
38 @classmethod 48 @classmethod
39 def tearDownClass(cls): 49 def tearDownClass(cls):
testcase/feedbackCustomerController/test_feedback_customer_enable.py
@@ -35,5 +35,6 @@ class test_feedback_customer_enable(unittest.TestCase): @@ -35,5 +35,6 @@ class test_feedback_customer_enable(unittest.TestCase):
35 def tearDownClass(cls): 35 def tearDownClass(cls):
36 pass 36 pass
37 37
  38 +
38 if __name__ == '__main__': 39 if __name__ == '__main__':
39 unittest.main() 40 unittest.main()