예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
def jwt_identity(payload):
    return User.get_by_id(payload)