-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from faststream.asyncapi.generate import get_app_schema | ||
from faststream.nats import NatsBroker | ||
from tests.asyncapi.base.v3_0_0.arguments import ArgumentsTestcase | ||
|
||
|
||
class TestArguments(ArgumentsTestcase): | ||
broker_class = NatsBroker | ||
|
||
def test_subscriber_bindings(self): | ||
broker = self.broker_class() | ||
|
||
@broker.subscriber("test") | ||
async def handle(msg): ... | ||
|
||
schema = get_app_schema(self.build_app(broker)).to_jsonable() | ||
key = tuple(schema["channels"].keys())[0] # noqa: RUF015 | ||
|
||
assert schema["channels"][key]["bindings"] == { | ||
"nats": {"bindingVersion": "custom", "subject": "test"} | ||
} |
Empty file.