We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1507a0 commit ef3f6e5Copy full SHA for ef3f6e5
tests/asyncapi/nats/v3_0_0/test_publisher.py
@@ -0,0 +1,20 @@
1
+from faststream.asyncapi.generate import get_app_schema
2
+from faststream.nats import NatsBroker
3
+from tests.asyncapi.base.v3_0_0.publisher import PublisherTestcase
4
+
5
6
+class TestArguments(PublisherTestcase):
7
+ broker_class = NatsBroker
8
9
+ def test_publisher_bindings(self):
10
+ broker = self.broker_class()
11
12
+ @broker.publisher("test")
13
+ async def handle(msg): ...
14
15
+ schema = get_app_schema(self.build_app(broker)).to_jsonable()
16
+ key = tuple(schema["channels"].keys())[0] # noqa: RUF015
17
18
+ assert schema["channels"][key]["bindings"] == {
19
+ "nats": {"bindingVersion": "custom", "subject": "test"}
20
+ }, schema["channels"][key]["bindings"]
0 commit comments