"""TS-07 — typed exceptions assert message format + field values."""

from __future__ import annotations

from mgf.livepush._errors import CapExceededError, LivePushError


def test_cap_exceeded_fields_and_message() -> None:
    e = CapExceededError(slot_key="tenant:42", cap=100)
    assert e.slot_key == "tenant:42"
    assert e.cap == 100
    assert isinstance(e, LivePushError)
    msg = str(e)
    assert "tenant:42" in msg and "100" in msg
