feat(log): record each HTTP attempt in the debug log with debug_requests

This commit is contained in:
imSp4rky
2026-11-27 18:05:00 -07:00
parent 0e2cedcdbe
commit 438419ab1b
24 changed files with 1132 additions and 107 deletions
+7
View File
@@ -12,6 +12,7 @@ from typing import Any
import pytest
from unshackle.core import binaries
from unshackle.core import session as http_session
from unshackle.core.config import config
from unshackle.core.proxies.proxy import CATALOGUES
from unshackle.core.update_checker import UpdateChecker
@@ -45,6 +46,12 @@ def no_update_check(monkeypatch: pytest.MonkeyPatch) -> None:
monkeypatch.setattr(UpdateChecker, "check_for_updates_sync", lambda *args, **kwargs: None)
@pytest.fixture(autouse=True)
def client_process(monkeypatch: pytest.MonkeyPatch) -> None:
"""Start as a client process, so a test that ran serve or a job worker cannot turn response bodies off."""
monkeypatch.setattr(http_session, "record_bodies", True)
@pytest.fixture(autouse=True)
def fresh_proxy_catalogues() -> None:
"""Fetch each proxy provider catalogue again, so one test's stub never answers another test."""