def test_get_by_id(self): """Get user by ID.""" user = User('foo', '*****@*****.**') user.save() retrieved = User.get_by_id(user.id) assert retrieved == user
def load_user(user_id): """Load user by ID.""" return User.get_by_id(int(user_id))