diff --git a/tests/test_auth_decorator.py b/tests/test_auth_decorator.py index 3585697..a0c715d 100644 --- a/tests/test_auth_decorator.py +++ b/tests/test_auth_decorator.py @@ -963,7 +963,9 @@ def test_params_token_doesnt_break_multiple_auths(self): # ... now pick the first auth back up again and complete it # https://github.com/mitsuhiko/flask/issues/968 - url = redir.location[len("http://localhost"):] + url = redir.location + if url.startswith("http://localhost"): + url = url[len("http://localhost"):] response = client.get(url, follow_redirects=True) assert response.status_code == 200