From c6206d3f5947031ad4beef434db2afa885a77eb5 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Tue, 3 Nov 2026 11:25:10 -0800 Subject: [PATCH] test(rag): stub the file_url fetcher in JSON ingest tests that reach it after the main merge --- .../unit/proxy/rag_endpoints/test_rag_endpoints.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tests/unit/proxy/rag_endpoints/test_rag_endpoints.py b/tests/unit/proxy/rag_endpoints/test_rag_endpoints.py index a42ef269bb8..d2e096668ed 100644 --- a/tests/unit/proxy/rag_endpoints/test_rag_endpoints.py +++ b/tests/unit/proxy/rag_endpoints/test_rag_endpoints.py @@ -499,7 +499,12 @@ def test_rag_ingest_uses_the_forwarded_provider_key_over_team_provider_credentia @pytest.mark.parametrize("ingest_request", [_ingest_form, _ingest_json]) -def test_rag_ingest_drop_params_drops_a_forwarded_key_that_cannot_be_an_http_header(client_team_a, ingest_request): +def test_rag_ingest_drop_params_drops_a_forwarded_key_that_cannot_be_an_http_header( + client_team_a, ingest_request, monkeypatch +): + monkeypatch.setattr( + "litellm.proxy.rag_endpoints.endpoints.fetch_file_url", _fetcher_answering(200, b"test content")[0] + ) aingest_patch, registry_patch = _patched_ingest_boundary( None, {"status": "completed", "vector_store_id": "vs_new", "file_id": "file_123"}, @@ -525,7 +530,12 @@ def test_rag_ingest_drop_params_drops_a_forwarded_key_that_cannot_be_an_http_hea @pytest.mark.parametrize("unread_request_field", ["not json", json.dumps({"drop_params": False})]) -def test_rag_ingest_json_body_ignores_a_request_field_it_does_not_read(client_team_a, unread_request_field): +def test_rag_ingest_json_body_ignores_a_request_field_it_does_not_read( + client_team_a, unread_request_field, monkeypatch +): + monkeypatch.setattr( + "litellm.proxy.rag_endpoints.endpoints.fetch_file_url", _fetcher_answering(200, b"test content")[0] + ) aingest_patch, registry_patch = _patched_ingest_boundary( None, {"status": "completed", "vector_store_id": "vs_new", "file_id": "file_123"},