def setUp(self): # 投资人登录充值 login.login_api(method='post', url=do_conf('URL', 'Host_Url') + '/member/login', data={"mobilephone": str(do_user('Invest', 'mobilephone')), "pwd": (do_user('Invest', 'pwd'))} )
def setUpClass(cls): cls.mysql = HandleMysql() # 管理人员登录 login.login_api(method='post', url=do_conf('URL', 'Host_Url') + '/member/login', data={ "mobilephone": str(do_user('Admin', 'mobilephone')), "pwd": (do_user('Admin', 'pwd')) }) # 管理人加标 add.add_loan_api(method='post', url=do_conf('URL', 'Host_Url') + '/loan/add', data={ "memberId": str(do_user('Invest', 'memberid')), "title": "超哥专属标的", "amount": 1000000, "loanRate": 10, "loanTerm": 3, "loanDateType": 0, "repaymemtWay": 4, "biddingDays": 5 }) sql = 'SELECT Id FROM loan WHERE MemberID={0} ORDER BY CreateTime DESC LIMIT 1;'.format( str(do_user('Invest', 'memberid'))) loan_id = str(cls.mysql(sql=sql)['Id']) setattr(DataReplace, 'loan_id', loan_id) # 管理人审核 audit.audit_loan_api(method='post', url=do_conf('URL', 'Host_Url') + '/loan/audit', data={ "id": loan_id, "status": 4 }) # 投资人登录 login.login_api(method='post', url=do_conf('URL', 'Host_Url') + '/member/login', data={ "mobilephone": str(do_user('Invest', 'mobilephone')), "pwd": (('Invest', 'pwd')) })