def test_bank_getmoney5(self): self.kaihu() self.u = User() self.acccount = 1 self.password = 1 self.gmoney = 1000 s = 3 l = Logic() s1 = l.bank_getmoney(self.acccount, self.password, self.gmoney) self.assertEqual(s, s1) from DBUtils import update sql = "delete from users " param = [] data = update(sql, param)
def kaihu(self): self.account = 1 self.username = 1 self.password = 1 self.country = 1 self.province = 1 self.street = 1 self.door = 1 self.money = 900 self.bank = "中国工商银行的昌平支行" l = Logic() s1 = l.kaihu(self.account, self.username, self.password, self.country, self.province, self.street, self.door, self.bank, self.money)
def test_bank_savemoney2(self): self.kaihu() self.u = User() self.u.setAccount(2) self.u.setMoney(1) s = False l = Logic() s1 = l.bank_savemoney(self.u.getAccount(), self.u.getMoney()) self.assertEqual(s, s1) from DBUtils import update sql = "delete from users " param = [] data = update(sql, param)
def test_bank_transfer4(self): self.kaihu() self.u = User() self.account1 = 2 self.account2 = 3 self.password = 1 self.money = 100 s = 1 l = Logic() s1 = l.bank_transfer(self.account1, self.account2, self.password, self.money) self.assertEqual(s, s1) from DBUtils import update sql = "delete from users " param = [] data = update(sql, param)
def test_kaihu1(self): self.account = 2 self.username = 1 self.password = 1 self.country = 1 self.province = 1 self.street = 1 self.door = 1 self.money = 0 self.bank = "中国工商银行的昌平支行" s = 1 l = Logic() s1 = l.kaihu(self.account, self.username, self.password, self.country, self.province, self.street, self.door, self.bank, self.money) self.assertEqual(s, s1) from DBUtils import update sql = "delete from users " param = [] data = update(sql, param)