Fix rest.py test after #5376