fix env variables exposure
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user