Beispiel #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
Beispiel #2
0
def load_user(user_id):
    """Load user by ID."""
    return User.get_by_id(int(user_id))