refactor(api): admit download job create and retry through one job_admission step

This commit is contained in:
imSp4rky
2026-11-25 23:15:16 -07:00
parent 92e8abbdbc
commit ee8e968127
27 changed files with 584 additions and 417 deletions
+2 -2
View File
@@ -504,11 +504,11 @@ def test_a_connection_that_stops_reading_is_dropped() -> None:
def test_a_download_job_refuses_a_tunnel_proxy(monkeypatch: pytest.MonkeyPatch) -> None:
from unshackle.core.api import handlers
from unshackle.core.api import job_admission
from unshackle.core.api.errors import APIError
with pytest.raises(APIError, match="tunnel"):
handlers.enforce_download_gates({"service": "EXAMPLE", "proxy": "tunnel:abc"}, None)
job_admission.enforce_download_gates({"service": "EXAMPLE", "proxy": "tunnel:t1"}, None)
@responses.activate