failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · fastapi/fastapi
(not found in data/tasks.jsonl)
| # | Tool | Arguments | Result |
|---|---|---|---|
| No trace captured. | |||
...........................................F
=================================== FAILURES ===================================
______ test_unsupported_methods_to_fallback_only_routes_return_404[POST] _______
tmp_path = PosixPath('/private/tmp/swe_work/mined_baseline/fastapi_15863/tmp/pytest-of-jp/pytest-0/test_unsupported_methods_to_fa0')
method = 'POST'
@pytest.mark.parametrize("method", ["POST", "PUT", "PATCH", "DELETE", "OPTIONS"])
def test_unsupported_methods_to_fallback_only_routes_return_404(
tmp_path: Path, method: str
):
dist = tmp_path / "dist"
write_file(dist / "index.html", "app shell")
app = FastAPI()
app.frontend("/", directory=dist, fallback="index.html")
response = TestClient(app).request(
method, "/dashboard/settings", headers={"accept": "text/html"}
)
> assert response.status_code == 404
E assert 405 == 404
E + where 405 = <Response [405 Method Not Allowed]>.status_code
tests/test_frontend.py:682: AssertionError
=============================== warnings summary ===============================
../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-1.6.0-py3-none-any/starlette/testclient.py:53
/Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-1.6.0-py3-none-any/starlette/testclient.py:53: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
_PortalFactoryType = Callable[[], AbstractContextManager[anyio.abc.BlockingPortal]]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 43 passed, 1 warning in 0.62s