def test_find(self): user = User("username", "password", "*****@*****.**") user.save() print User.find(user)
def test_find(self): user = User('username', 'password', '*****@*****.**') user.save() print User.find(user)
def test_validate(self): user = User("username", "password", "*****@*****.**") user.save() self.assertFalse(User.validate(User("invalid_user", "pass")), "user should not be valid") self.assertTrue(User.validate(user), "user should be valid")
def test_validate(self): user = User('username', 'password', '*****@*****.**') user.save() self.assertFalse(User.validate(User('invalid_user', 'pass')), 'user should not be valid') self.assertTrue(User.validate(user), 'user should be valid')