fix test_rest to work for https