From e8374de0c7026df139232dd2ea5440ca6b768569 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Sun, 10 Jul 2022 11:07:36 +0200 Subject: [PATCH] Fix tests --- tests/test_admin.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_admin.py b/tests/test_admin.py index 5ccbaa2..f40767b 100644 --- a/tests/test_admin.py +++ b/tests/test_admin.py @@ -19,7 +19,9 @@ def test_admin_endpoints_are_authenticated(client: TestClient) -> None: # Admin routes should redirect to the login page assert resp.status_code == 302, f"{method} {route.path} is unauthenticated" - assert resp.headers.get("Location") == "http://testserver/admin/login" + assert resp.headers.get("Location", "").startswith( + "http://testserver/admin/login" + ) routes_tested.append((method, route.path)) assert len(routes_tested) > 0