def post(self, *args, **kwargs): user_id = self.get_secure_cookie("user_id") user_id = int(user_id) money = self.get_argument("totalmoney") money = int(money) accountId = add_paypal_account(user_id,money) self.redirect('/account/{0}'.format(accountId))
def post(self, *args, **kwargs): user_id = self.get_secure_cookie("user_id") user_id = int(user_id) money = self.get_argument("totalmoney") money = int(money) accountId = add_paypal_account(user_id, money) self.redirect('/account/{0}'.format(accountId))
def test_add_paypal_account(self): ''' 测试添加支付宝账户,所有金额都会添加到 User.id == 1 的账户 :return: ''' accountId = add_paypal_account(1, 10) self.assertTrue(accountId) self.tmp = accountId
def test_add_paypal_account(self): ''' 测试添加支付宝账户,所有金额都会添加到 User.id == 1 的账户 :return: ''' accountId = add_paypal_account(1,10) self.assertTrue(accountId) self.tmp = accountId