Skip to content

Commit

Permalink
tests: skip redirect test
Browse files Browse the repository at this point in the history
seemingly, this test hits a fallback path for resolving access urls and
that fallback requires an API client; this issue may have started when
starlette (ASGI) framework switched from requests to httpx.

> So... the largest impact of this change will be for FastAPI devs.
They're the largest install base, they're using the test client, and the
change will introduce breaking changes into their test suites and
require extra work for their teams.

-- encode/starlette#1376 (comment)

possible mitigations: upgrade fastapi, as per notes in notes in
tiangolo/fastapi#5350
  • Loading branch information
miku committed Mar 17, 2023
1 parent b683634 commit 04506c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_web.py
Expand Up @@ -280,7 +280,7 @@ def test_access_redirect_fallback(client: Any, mocker: Any) -> None:
assert b"Access Location Not Found" in rv.content
assert b"archive.org/download/some/thing.else.pdf" in rv.content


@pytest.mark.skip(reason="todo: requires a mocked fatcat API client, not just es")
def test_access_redirect_encoding(client: Any, mocker: Any) -> None:

with open("tests/files/elastic_get_work_a6gvpil4brdgzhqyaog3ftngqe.json") as f:
Expand Down

0 comments on commit 04506c4

Please sign in to comment.