(send: Send)
| 456 | |
| 457 | |
| 458 | async def test_api_exclude(send: Send) -> None: |
| 459 | class Parsed(BaseModel): |
| 460 | __api_exclude__ = {"parsed"} |
| 461 | text: str |
| 462 | parsed: object = None |
| 463 | |
| 464 | assert await send({"c": [Parsed.construct(text="x", parsed={"a": 1})]}) == {"c": [{"text": "x"}]} |
| 465 | |
| 466 | |
| 467 | class LateBoundBlock(BaseModel): |