Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 18, 2024
1 parent 5f99e7a commit a071453
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions mondey_backend/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@
from dateutil.relativedelta import relativedelta
from fastapi import FastAPI
from fastapi.testclient import TestClient
from PIL import Image
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.ext.asyncio import async_sessionmaker
from sqlalchemy.ext.asyncio import create_async_engine
from sqlmodel import Session
from sqlmodel import SQLModel
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool

from mondey_backend import settings
from mondey_backend.databases.users import get_async_session
from mondey_backend.dependencies import current_active_researcher
Expand Down Expand Up @@ -39,14 +48,6 @@
from mondey_backend.models.users import Base
from mondey_backend.models.users import User
from mondey_backend.models.users import UserRead
from PIL import Image
from sqlalchemy.ext.asyncio import AsyncSession
from sqlalchemy.ext.asyncio import async_sessionmaker
from sqlalchemy.ext.asyncio import create_async_engine
from sqlmodel import Session
from sqlmodel import SQLModel
from sqlmodel import create_engine
from sqlmodel.pool import StaticPool


@pytest.fixture()
Expand Down Expand Up @@ -240,9 +241,7 @@ def session(children: list[dict], monkeypatch: pytest.MonkeyPatch):
MilestoneAnswerSession(
child_id=1,
user_id=3,
created_at=datetime.datetime(
last_month.year, last_month.month, 15
),
created_at=datetime.datetime(last_month.year, last_month.month, 15),
)
)
session.add(
Expand Down Expand Up @@ -459,7 +458,6 @@ def session(children: list[dict], monkeypatch: pytest.MonkeyPatch):

@pytest.fixture
def statistics_session(session):

today = datetime.datetime.today()
last_month = today - relativedelta(months=1)

Expand All @@ -469,9 +467,7 @@ def statistics_session(session):
MilestoneAnswerSession(
child_id=1,
user_id=3,
created_at=datetime.datetime(
today.year, last_month.month, 20
),
created_at=datetime.datetime(today.year, last_month.month, 20),
)
)
session.add(
Expand Down

0 comments on commit a071453

Please sign in to comment.