Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,12 @@ def register_routers(app: FastAPI) -> None:

### Registration Logs
- Логи захватывают все исключения возникшие в системе
и с помошью дисперичизации распределяется по нужным **file.log**
и с помошью диспечиризации распределяется по нужным **file.log**
```python
# app_includes/logs_errors.py
from fastapi import FastAPI
from fastapi.responses import JSONResponse

from api_v1.exeptions import ValidationError


Expand Down
5 changes: 4 additions & 1 deletion api_v1/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ async def lifespan(app: FastAPI):
yield
await conn.run_sync(BaseModel.metadata.drop_all)

app = FastAPI(docs_url=None, redoc_url=None)
app = FastAPI(docs_url=None,
redoc_url=None,
lifespan=lifespan,
)
register_routers(app=app)
app.dependency_overrides[db_connection.session_geter] = override_get_async_session

Expand Down