feat: перенос структуры приложения из первой лабы

This commit is contained in:
Ильяс
2026-10-22 22:45:34 +03:00
parent 65003b6119
commit 5893d051c1
19 changed files with 1220 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
import os
import pytest
from httpx import ASGITransport, AsyncClient
from app.main import app
@pytest.fixture
async def client():
base_url = os.getenv("BASE_URL", "http://testserver")
if base_url.startswith("http://testserver"):
transport = ASGITransport(app=app)
async with AsyncClient(transport=transport, base_url="http://testserver") as ac:
yield ac
else:
async with AsyncClient(base_url=base_url) as ac:
yield ac