Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /gavincui1026_Fastapi-Backend /backend /tests /conftest.py
| import asgi_lifespan | |
| import fastapi | |
| import httpx | |
| import pytest | |
| from src.main import initialize_backend_application | |
| def backend_test_app() -> fastapi.FastAPI: | |
| """ | |
| A fixture that re-initializes the FastAPI instance for test application. | |
| """ | |
| return initialize_backend_application() | |
| async def initialize_backend_test_application(backend_test_app: fastapi.FastAPI) -> fastapi.FastAPI: # type: ignore | |
| async with asgi_lifespan.LifespanManager(backend_test_app): | |
| yield backend_test_app | |
| async def async_client(initialize_backend_test_application: fastapi.FastAPI) -> httpx.AsyncClient: # type: ignore | |
| async with httpx.AsyncClient( | |
| app=initialize_backend_test_application, | |
| base_url="http://testserver", | |
| headers={"Content-Type": "application/json"}, | |
| ) as client: | |
| yield client | |
Xet Storage Details
- Size:
- 981 Bytes
- Xet hash:
- 92a3600bdffecdd93605d8b94b5671d2fa6d066a52559634c893718b4d682456
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.