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 = 1000 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) self.account = 2 self.username = 1 self.password = 1 self.country = 1 self.province = 1 self.street = 1 self.door = 1 self.money = 100 self.bank = "中国工商银行的昌平支行" l = Logic() s2 = l.kaihu(self.account, self.username, self.password, self.country, self.province, self.street, self.door, self.bank, self.money)
def test_kaihu2(self): self.account = 4 self.username = 1 self.password = 1 self.country = 1 self.province = 1 self.street = 1 self.door = 1 self.money = 0 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) s1 = l.kaihu(self.account, self.username, self.password, self.country, self.province, self.street, self.door, self.bank, self.money) s = 2 self.assertEqual(s, s1) from DBUtils import update sql = "delete from users " param = [] data = update(sql, param)