From 2a2da688010c0093313c0ec0e0a9c5b07f472388 Mon Sep 17 00:00:00 2001 From: Vladimir Kibisov Date: Sat, 3 Aug 2024 21:43:57 +0300 Subject: [PATCH] Nats AsyncAPI obj schema test --- tests/asyncapi/nats/v3_0_0/test_obj_schema.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/asyncapi/nats/v3_0_0/test_obj_schema.py diff --git a/tests/asyncapi/nats/v3_0_0/test_obj_schema.py b/tests/asyncapi/nats/v3_0_0/test_obj_schema.py new file mode 100644 index 0000000000..dd3907d73e --- /dev/null +++ b/tests/asyncapi/nats/v3_0_0/test_obj_schema.py @@ -0,0 +1,15 @@ +from faststream import FastStream +from faststream.asyncapi.generate import get_app_schema +from faststream.asyncapi.version import AsyncAPIVersion +from faststream.nats import NatsBroker + + +def test_obj_schema(): + broker = NatsBroker() + + @broker.subscriber("test", obj_watch=True) + async def handle(): ... + + schema = get_app_schema(FastStream(broker, asyncapi_version=AsyncAPIVersion.v3_0)).to_jsonable() + + assert schema["channels"] == {}