Skip to content

Commit

Permalink
Nats AsyncAPI obj schema test
Browse files Browse the repository at this point in the history
  • Loading branch information
KrySeyt committed Aug 3, 2024
1 parent 0e2a3c0 commit 2a2da68
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/asyncapi/nats/v3_0_0/test_obj_schema.py
Original file line number Diff line number Diff line change
@@ -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"] == {}

0 comments on commit 2a2da68

Please sign in to comment.