Skip to content

Commit

Permalink
Redis asyncapi fastapi tests
Browse files Browse the repository at this point in the history
  • Loading branch information
KrySeyt committed Aug 2, 2024
1 parent 2f01e6b commit 08fe652
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/asyncapi/redis/v3_0_0/test_fastapi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
from typing import Type

from faststream.asyncapi.version import AsyncAPIVersion
from faststream.redis import TestRedisBroker
from faststream.redis.fastapi import RedisRouter
from tests.asyncapi.base.v3_0_0.arguments import FastAPICompatible
from tests.asyncapi.base.v3_0_0.fastapi import FastAPITestCase
from tests.asyncapi.base.v3_0_0.publisher import PublisherTestcase


class TestRouterArguments(FastAPITestCase, FastAPICompatible):
broker_factory = staticmethod(lambda: RedisRouter(asyncapi_version=AsyncAPIVersion.v3_0))
router_factory = RedisRouter
broker_wrapper = staticmethod(TestRedisBroker)

def build_app(self, router):
return router


class TestRouterPublisher(PublisherTestcase):
broker_factory = staticmethod(lambda: RedisRouter(asyncapi_version=AsyncAPIVersion.v3_0))

def build_app(self, router):
return router

0 comments on commit 08fe652

Please sign in to comment.