From bca1039fea62c644f140773f5963a7075b75ff41 Mon Sep 17 00:00:00 2001 From: bomzheg Date: Tue, 30 Jul 2024 21:11:06 +0300 Subject: [PATCH] update versions --- pyproject.toml | 17 +++++++++-------- tests/fixtures/chat_constants.py | 13 +++++++++++++ .../integration/bot_full/test_full_team_ops.py | 4 ++-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5e5f37de..a360ebc1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -12,9 +12,9 @@ dependencies = [ "pyyaml>=6.0,<7.0", "python-dateutil>=2.8.2,<3.0", "colorlog>=6.7.0,<7.0", - "aiogram>=3.5.0,<3.6.0", + "aiogram>=3.10.0,<3.11.0", "pydantic>=2.5,<3.0", - "aiogram_dialog>=2.0,<2.1", + "aiogram_dialog>=2.1,<2.2", "sqlalchemy[asyncio]>=2.0,<3.0", "alembic>=1.10.0,<2.0", "asyncpg>=0.27.0,<1.0", @@ -22,9 +22,10 @@ dependencies = [ "redis>=5.0.1,<6.0", "pyrogram>=2.0.57,<3.0", "dataclass_factory>=2.16,<3.0", + "adaptix==3.0.0b7", "apscheduler>=3.9.1,<4.0", - "fastapi>=0.100,<0.101", - "uvicorn>=0.20.0,<0.21.0", + "fastapi==0.111.1", + "uvicorn>=0.30.0,<0.31.0", "python-multipart>=0.0.5,<0.1.0", "python-jose[cryptography]>=3.3.0,<4.0", "passlib>=1.7.4,<2.0", @@ -34,20 +35,20 @@ dependencies = [ "lxml>=4.9.2,<5.0", "matplotlib>=3.7.1,<4.0", "greenlet<3.0.0", - "dishka==1.0.0", - "asgi-monitor>=0.3.0,<0.4.0", + "dishka==1.2.0", + "asgi-monitor>=0.4.0,<0.5.0", ] [project.optional-dependencies] dev = [ - "aiogram_dialog[tools]>=2.0,<2.1", + "aiogram_dialog[tools]>=2.1,<2.2", "locust>=2.15.1,<3", ] test = [ "pytest>=7.2.0,<8.0", "pytest-ordering>=0.6,<0.7", "pytest-asyncio>=0.18.3,<0.19", - "testcontainers[postgresql]>=4.5.1,<5.0", + "testcontainers>=4.5.1,<5.0", "httpx>=0.23.0,<0.24.0", "coverage[toml]", "ruff>=0.2.1,<0.3", diff --git a/tests/fixtures/chat_constants.py b/tests/fixtures/chat_constants.py index 107ae214..47b4967a 100644 --- a/tests/fixtures/chat_constants.py +++ b/tests/fixtures/chat_constants.py @@ -51,6 +51,19 @@ def create_tg_chat( ) +def chat_to_full_chat(chat: tg.Chat) -> tg.ChatFullInfo: + return tg.ChatFullInfo( + id=chat.id, + title=chat.title, + type=chat.type, + username=chat.username, + first_name=chat.first_name, + last_name=chat.last_name, + accent_color_id=0, + max_reaction_count=3, + ) + + def create_db_chat(): return models.Chat( tg_id=GRYFFINDOR_CHAT_DTO.tg_id, diff --git a/tests/integration/bot_full/test_full_team_ops.py b/tests/integration/bot_full/test_full_team_ops.py index dea7d287..2f57f677 100644 --- a/tests/integration/bot_full/test_full_team_ops.py +++ b/tests/integration/bot_full/test_full_team_ops.py @@ -14,7 +14,7 @@ from shvatka.core.utils.datetime_utils import tz_utc from shvatka.infrastructure.db.dao.holder import HolderDao from shvatka.tgbot.views.commands import CREATE_TEAM_COMMAND, ADD_IN_TEAM_COMMAND -from tests.fixtures.chat_constants import create_tg_chat +from tests.fixtures.chat_constants import create_tg_chat, chat_to_full_chat from tests.fixtures.player import promote from tests.fixtures.user_constants import ( create_tg_user, @@ -35,7 +35,7 @@ async def test_create_team(harry: dto.Player, dp: Dispatcher, bot: MockedBot, da ChatMemberOwner(user=harry_tg, is_anonymous=False, status=ChatMemberStatus.CREATOR) ], ) - bot.add_result_for(GetChat, ok=True, result=chat) + bot.add_result_for(GetChat, ok=True, result=chat_to_full_chat(chat)) bot.add_result_for(SendMessage, ok=True) # one for captain bot.add_result_for(SendMessage, ok=True) # one for log update = Update(