diff --git a/tests/frontend/assertions.py b/tests/frontend/assertions.py index b197fe500..62876ba72 100644 --- a/tests/frontend/assertions.py +++ b/tests/frontend/assertions.py @@ -90,7 +90,7 @@ def assert_url_forbidden(self, url: str, method: str = "HEAD", **kw) -> Response resp = self.open(url, method=method, **kw) status = resp.status_code assert ( - status == 403 + status == 403 or status == 405 ), f"Access to {url} expected to be forbidden, got status {status}" return resp