develop
Сергей Ванюшкин 2024-01-29 04:35:37 +03:00
parent 1b5182b41a
commit b5da5736e9
4 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@ from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
DB_HOST: str = "localhost"
DB_HOST: str = "db"
DB_PORT: int = 5432
POSTGRES_DB: str = "fastfod_db"
POSTGRES_PASSWORD: str = "postgres"

View File

@ -25,7 +25,10 @@ async_session_maker = async_sessionmaker(
@pytest.fixture(scope="session")
def event_loop():
loop = asyncio.get_event_loop_policy().new_event_loop()
try:
loop = asyncio.get_event_loop()
except RuntimeError:
loop = asyncio.new_event_loop()
yield loop
loop.close()

View File

@ -53,4 +53,3 @@ async def test_submenu(asession: AsyncSession) -> None:
submenu = await SubMenuCrud.create_submenu_item(
menu_id, menubaseschema.model_validate(submenu), asession,
)
print(submenu)