mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-25 07:12:20 +01:00
refactor(search): extract outbound fetch transport (#5953)
This commit is contained in:
@@ -6,6 +6,7 @@ notice, per-call override clamped to the hard cap, and a pre-buffer refusal
|
||||
when Content-Length already exceeds the hard ceiling.
|
||||
"""
|
||||
import json
|
||||
import ipaddress
|
||||
from contextlib import contextmanager
|
||||
|
||||
import pytest
|
||||
@@ -90,7 +91,11 @@ class _FakeStream:
|
||||
def no_cache(monkeypatch, tmp_path):
|
||||
monkeypatch.setattr(content_mod, "CONTENT_CACHE_DIR", tmp_path)
|
||||
monkeypatch.setattr(content_mod, "_cache_result", lambda *a, **k: None)
|
||||
monkeypatch.setattr(content_mod, "_public_http_url", lambda u: True)
|
||||
monkeypatch.setattr(
|
||||
content_mod,
|
||||
"_resolve_public_ips",
|
||||
lambda _url: [ipaddress.ip_address("93.184.216.34")],
|
||||
)
|
||||
|
||||
|
||||
def _patch_stream(monkeypatch, fake):
|
||||
|
||||
Reference in New Issue
Block a user