Fix release blockers and deployment build
deploy / deploy (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-21 21:22:29 +02:00
parent b8091e59bd
commit a4eced8be5
64 changed files with 1011 additions and 675 deletions
+7 -3
View File
@@ -6,8 +6,8 @@ from apps.sources.services.fetcher import (
ContentRejectedError,
FetchError,
FetchTimeoutError,
RateLimitedError,
PolicyBlockedError,
RateLimitedError,
fetch_url,
)
from apps.sources.services.url_security import ValidatedUrl
@@ -79,7 +79,9 @@ def test_fetcher_rejects_dns_rebinding(monkeypatch):
def validate(url: str, **kwargs):
if "/final" in url:
return ValidatedUrl(url=url, hostname="example.org", port=443, addresses=("198.51.100.12",))
return ValidatedUrl(
url=url, hostname="example.org", port=443, addresses=("198.51.100.12",)
)
return ValidatedUrl(url=url, hostname="example.org", port=443, addresses=("93.184.216.34",))
monkeypatch.setattr("apps.sources.services.fetcher.validate_public_url", validate)
@@ -133,7 +135,9 @@ def test_fetcher_rejects_policy_content_size_and_http(monkeypatch):
client.close()
client = httpx.Client(
transport=httpx.MockTransport(lambda request: (_ for _ in ()).throw(httpx.TimeoutException("timeout")))
transport=httpx.MockTransport(
lambda request: (_ for _ in ()).throw(httpx.TimeoutException("timeout"))
)
)
with pytest.raises(FetchTimeoutError):
fetch_url("https://example.org/slow", client=client)