fix env variables exposure

This commit is contained in:
Michael Ingvarsson
2026-07-16 11:54:22 +02:00
parent cf1e33474e
commit 64db2efa38
3 changed files with 18 additions and 7 deletions
+6
View File
@@ -140,6 +140,12 @@ class TestFormatResults:
class TestSearchSearxng:
@pytest.fixture(autouse=True)
def mock_searxng_url(self) -> "Generator[None, None, None]":
from typing import Generator
with patch("gitea.tools.research_tools._SEARXNG_URL", "http://localhost"):
yield
def _make_searxng_response(self, results: list[dict]) -> MagicMock:
mock_resp = MagicMock()
mock_resp.json.return_value = {"results": results}