test_specialLoanQuery.py
1.14 KB
#!/usr/bin/python
# -*- coding: UTF-8 -*-
import unittest
from commons import common as com
from commons.MySession import my,hg
from commons.api.hg.loan_vipCustomer.specialLoanQuery import specialLoanQuery
s=specialLoanQuery()
class test_specialLoanQuery(unittest.TestCase):
"杭果市场-借款管理-大客户借款"
@unittest.case_mark(my.mark())
def test_specialLoanQuery_01(self):
"新增借款页-查询:点击新增,查询客户的订单信息"
#获取当天时间
body=s.body.copy()
body["tradeDateStart"]=com.dates()
body["tradeDateEnd"] = com.dates()
re=hg.post(url=s.url,headers=s.header,json=s.body)
print(re.json())
data=["未查询到交易信息","操作成功","该时间段已发生过预支借款,若还需要借款,请更改借款交易时间"]
self.assertEqual(re.status_code, 200)
if any(t in str(re.json()).replace(" ","") for t in data):
assert True
else:
assert False
if __name__ == "__main__":
unittest.main(verbosity=2)
# com.run_one(test_weightBizBill_listPage("test_weightBizBill_listPage_01"))