test: cover null venue SOR normalization
This commit is contained in:
@@ -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",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user