feat(ai): ecosysteme d'outils phase 2 - recherche a cle, cache/retry, Playwright, crawl, Gitea/GitHub, documents (#92)
This commit is contained in:
@@ -22,6 +22,23 @@ def _reset_tool_ratelimit():
|
||||
ratelimit.reset()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _disable_web_cache():
|
||||
"""Web cache off by default: tests stay hermetic (no cross-test hits).
|
||||
|
||||
tests/test_web_cache.py re-enables it explicitly with a tmp path.
|
||||
"""
|
||||
from backend.tools import webcache
|
||||
|
||||
saved_path = os.environ.get("OBSIGATE_WEB_CACHE_PATH")
|
||||
os.environ["OBSIGATE_WEB_CACHE_TTL"] = "0"
|
||||
yield
|
||||
if saved_path is None:
|
||||
os.environ.pop("OBSIGATE_WEB_CACHE_PATH", None)
|
||||
else:
|
||||
os.environ["OBSIGATE_WEB_CACHE_PATH"] = saved_path
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _clean_env():
|
||||
"""Ensure no vault env vars leak between tests — but preserve test vault config."""
|
||||
|
||||
Reference in New Issue
Block a user