forked from kenzuya/unshackle
feat(log): record each HTTP attempt in the debug log with debug_requests
This commit is contained in:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user