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 test_get_by_id(self) -> None: """Get user by ID.""" user = User("*****@*****.**") user.save() retrieved = User.get_by_id(user.id) assert retrieved == user
def jwt_identity(payload): return User.get_by_id(payload)