Skip to content

Commit fe80ff1

Browse files
authored
Merge pull request #10 from sumaro2101/develop
add filespan to test client
2 parents 9453d28 + 065fefc commit fe80ff1

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,12 @@ def register_routers(app: FastAPI) -> None:
6262

6363
### Registration Logs
6464
- Логи захватывают все исключения возникшие в системе
65-
и с помошью дисперичизации распределяется по нужным **file.log**
65+
и с помошью диспечиризации распределяется по нужным **file.log**
6666
```python
6767
# app_includes/logs_errors.py
6868
from fastapi import FastAPI
69+
from fastapi.responses import JSONResponse
70+
6971
from api_v1.exeptions import ValidationError
7072

7173

api_v1/tests/conftest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,10 @@ async def lifespan(app: FastAPI):
4343
yield
4444
await conn.run_sync(BaseModel.metadata.drop_all)
4545

46-
app = FastAPI(docs_url=None, redoc_url=None)
46+
app = FastAPI(docs_url=None,
47+
redoc_url=None,
48+
lifespan=lifespan,
49+
)
4750
register_routers(app=app)
4851
app.dependency_overrides[db_connection.session_geter] = override_get_async_session
4952

0 commit comments

Comments
 (0)