generated from coulomb/repo-seed
feat(statehub): add offline write buffer relay
This commit is contained in:
22
tests/test_mcp_queued_receipts.py
Normal file
22
tests/test_mcp_queued_receipts.py
Normal file
@@ -0,0 +1,22 @@
|
||||
import json
|
||||
|
||||
from mcp_server import server
|
||||
|
||||
|
||||
def test_mcp_write_returns_queued_receipt_without_requiring_rest_shape(monkeypatch):
|
||||
monkeypatch.setattr(
|
||||
server,
|
||||
"_post",
|
||||
lambda path, body: {
|
||||
"queued": True,
|
||||
"outbox_id": "env-1",
|
||||
"idempotency_key": "statehub-edge:env-1",
|
||||
"upstream": "unreachable",
|
||||
},
|
||||
)
|
||||
|
||||
result = json.loads(server.add_progress_event("queued progress"))
|
||||
|
||||
assert result["queued"] is True
|
||||
assert result["tool"] == "add_progress_event"
|
||||
assert result["receipt"]["outbox_id"] == "env-1"
|
||||
Reference in New Issue
Block a user