From 8991f71b2a4d64f53eea80645dc66fdd51fbf8d4 Mon Sep 17 00:00:00 2001 From: Malcolm Scott Date: Sun, 19 May 2024 20:28:47 +0100 Subject: [PATCH] Unbreak tests by not making an incorrect assumption about what libraries do. (Some library change caused `redir.location` not to become fully-qualified, i.e. it's now "/fake_wls?..." rather than "http://localhost/fake_wls?...".) --- tests/test_auth_decorator.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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