diff --git a/tests/e2e/test_fetch.py b/tests/e2e/test_fetch.py index d743510..4fd8c33 100644 --- a/tests/e2e/test_fetch.py +++ b/tests/e2e/test_fetch.py @@ -37,7 +37,10 @@ def test_dead_page(kn): res = kn("fetch", "https://example.com/nonexistent-xyz-12345") assert res.code == 1 data = res.yaml() - assert data["error"] == "Not found" + # The backend rejects an unfetchable page with either a 404 ("Not found") + # or a 422 ("Unprocessable entity") depending on how far upstream got — + # both are valid "this page can't be fetched" outcomes. + assert data["error"] in ("Not found", "Unprocessable entity") def test_invalid_key_on_fetch(kn):