test: cover null venue SOR normalization

This commit is contained in:
Hermes Agent
2026-08-19 13:16:14 +09:00
parent 64e4e32f9d
commit 43f6fea7ac
+5 -1
View File
@@ -121,7 +121,10 @@ def test_invalid_venue_is_rejected_before_slot_transition(invalid_venue: str) ->
assert repo.list_slots("default")[0].status is SlotState.INACTIVE
def test_omitted_wire_venue_remains_sor_for_cancel_and_restart() -> None:
@pytest.mark.parametrize("venue_field", [{}, {"venue": None}], ids=["omitted", "null"])
def test_missing_wire_venue_remains_sor_for_cancel_and_restart(
venue_field: dict[str, object],
) -> None:
repo = InMemorySlotRepository()
service = SlotService(repo)
intents = IntentService(
@@ -142,6 +145,7 @@ def test_omitted_wire_venue_remains_sor_for_cancel_and_restart() -> None:
"intent_id": "auto-buy",
"portfolio_id": "PF-1",
"qty": 1,
**venue_field,
},
correlation_id="auto-buy",
)