Commit 0d2146376f8162f31f9bef4a320082d861fe519e
1 parent
5486633f
明细查询优化
Showing
1 changed file
with
11 additions
and
4 deletions
testcase/feedbackAccounrecordController_list/feedbackAccounrecordController_list.py
... | ... | @@ -3,6 +3,7 @@ import urllib3 |
3 | 3 | from commons.MySession import my,sy1 |
4 | 4 | from commons.api.feedbackAccounrecordController_list import feedbackAccounrecordController_list |
5 | 5 | urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) |
6 | +import commons.ConfigDB as db | |
6 | 7 | farcl = feedbackAccounrecordController_list() |
7 | 8 | |
8 | 9 | class test_feedbackAccounrecordController_list(unittest.TestCase): |
... | ... | @@ -10,16 +11,22 @@ class test_feedbackAccounrecordController_list(unittest.TestCase): |
10 | 11 | @classmethod |
11 | 12 | def setUpClass(cls): |
12 | 13 | pass |
14 | + def setUp(self): | |
15 | + self.body = db.mysql_selectOne( | |
16 | + '''SELECT dili_jmsf.feedback_account_record.created,dili_jmsf.feedback_order.record_number | |
17 | +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 | |
18 | +ORDER BY dili_jmsf.feedback_account_record.order_ids DESC LIMIT 1''') | |
19 | + print("查询出查询时间和交易流水号:", self.body[0],self.body[1]) | |
13 | 20 | |
14 | 21 | def test_feedbackAccounrecordController_list_01(self): |
15 | - body = farcl.body.replace("2021-08-05 00:00:00", "2021-08-05 00:00:00")\ | |
16 | - .replace("2021-08-05 23:59:59", "2021-08-05 23:59:59")\ | |
17 | - .replace("1075782308694007808", "1075785985186013184") | |
22 | + body = farcl.body.replace("2021-08-05 00:00:00", str(self.body[0]))\ | |
23 | + .replace("2021-08-05 23:59:59", str(self.body[0]))\ | |
24 | + .replace("1075782308694007808", self.body[1]) | |
18 | 25 | |
19 | 26 | re = sy1.post(url = farcl.url, data = body,headers = farcl.header) |
20 | 27 | print(re.headers) |
21 | 28 | print(re.json()) |
22 | - self.assertTrue("1075785985186013184" in str(re.json())) | |
29 | + self.assertTrue(self.body[1] in str(re.json())) | |
23 | 30 | return re |
24 | 31 | |
25 | 32 | @classmethod | ... | ... |