def test_get_by_id(self): """Get user by ID.""" user = User(username='******', email='*****@*****.**') 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))