Buckets:

download
raw
861 Bytes
import asyncio
import pytest
def test_gateway_startup_runs_preflight(monkeypatch):
import mcp_server.gateway as gateway
calls = []
class SentinelError(Exception):
pass
def _fake_preflight():
calls.append("run")
return type("PreflightResult", (), {"status": "warning", "checks": []})()
def _fake_format(result):
calls.append("format")
return ["warning"]
monkeypatch.setattr(gateway, "run_startup_preflight", _fake_preflight)
monkeypatch.setattr(gateway, "format_preflight_report", _fake_format)
monkeypatch.setattr(
gateway,
"_build_security_config_from_env",
lambda: (_ for _ in ()).throw(SentinelError("stop")),
)
with pytest.raises(SentinelError, match="stop"):
asyncio.run(gateway.startup_event())
assert calls == ["run", "format"]

Xet Storage Details

Size:
861 Bytes
·
Xet hash:
5b22bf515321e731ba6b11be272e563286c2257947b52acaf0c8ae776c256b6e

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.