refactor: improve variable naming and add comments for clarity in models and services
Test / test (push) Successful in 15s
Test / test (push) Successful in 15s
This commit is contained in:
@@ -30,9 +30,9 @@ async def session_factory() -> AsyncGenerator[async_sessionmaker[AsyncSession],
|
||||
(User.__table__, Organization.__table__, OrganizationMember.__table__),
|
||||
)
|
||||
await conn.run_sync(Base.metadata.create_all, tables=tables)
|
||||
SessionLocal = async_sessionmaker(engine, expire_on_commit=False)
|
||||
session_local = async_sessionmaker(engine, expire_on_commit=False)
|
||||
|
||||
yield SessionLocal
|
||||
yield session_local
|
||||
|
||||
await engine.dispose()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import date, datetime, timedelta, timezone
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
import pytest
|
||||
from app.models.task import Task
|
||||
@@ -23,7 +23,7 @@ async def test_create_task_endpoint_creates_task_and_activity(
|
||||
) -> None:
|
||||
scenario = await prepare_scenario(session_factory)
|
||||
token = make_token(scenario.user_id, scenario.user_email)
|
||||
due_date = (date.today() + timedelta(days=5)).isoformat()
|
||||
due_date = (datetime.now(timezone.utc).date() + timedelta(days=5)).isoformat()
|
||||
|
||||
response = await client.post(
|
||||
"/api/v1/tasks/",
|
||||
|
||||
Reference in New Issue
Block a user