1212 asyncapi_spec_yaml ,
1313 generate_asyncapi_schema ,
1414)
15- from starlette . applications import Starlette
15+ from fastapi import FastAPI
1616from starlette .requests import Request
1717from starlette .responses import HTMLResponse , JSONResponse , Response
1818from starlette .routing import WebSocketRoute
@@ -31,7 +31,7 @@ def setup_method(self) -> None:
3131 async def websocket_endpoint (websocket : WebSocket ):
3232 pass
3333
34- self .app = Starlette (
34+ self .app = FastAPI (
3535 routes = [
3636 WebSocketRoute ("/ws" , websocket_endpoint ),
3737 ]
@@ -93,7 +93,7 @@ class TestAsyncAPISpecJSON:
9393 def setup_method (self ) -> None :
9494 """Set up test fixtures."""
9595 self .mock_request = Mock (spec = Request )
96- self .app = Starlette ()
96+ self .app = FastAPI ()
9797 # Add FastAPI-like attributes
9898 self .app .title = "Test API"
9999 self .app .version = "1.0.0"
@@ -163,7 +163,7 @@ class TestAsyncAPISpecYAML:
163163 def setup_method (self ) -> None :
164164 """Set up test fixtures."""
165165 self .mock_request = Mock (spec = Request )
166- self .app = Starlette ()
166+ self .app = FastAPI ()
167167 # Add FastAPI-like attributes
168168 self .app .title = "Test API"
169169 self .app .version = "1.0.0"
@@ -256,7 +256,7 @@ class TestAsyncAPIDocs:
256256 def setup_method (self ) -> None :
257257 """Set up test fixtures."""
258258 self .mock_request = Mock (spec = Request )
259- self .app = Starlette ()
259+ self .app = FastAPI ()
260260 # Add FastAPI-like attributes
261261 self .app .title = "Test API"
262262 self .app .version = "1.0.0"
0 commit comments