diff --git a/aiogram/api/client/session/aiohttp.py b/aiogram/api/client/session/aiohttp.py index 2122d6e3..28ca6db0 100644 --- a/aiogram/api/client/session/aiohttp.py +++ b/aiogram/api/client/session/aiohttp.py @@ -62,7 +62,8 @@ class AiohttpSession(BaseSession): return self def __deepcopy__(self: T, memo: Optional[Dict[int, Any]] = None) -> T: - if memo is None: + if memo is None: # pragma: no cover + # This block was never be called memo = {} cls = self.__class__ diff --git a/tests/test_api/test_client/test_base_bot.py b/tests/test_api/test_client/test_base_bot.py index 7e8f2a85..22a5a767 100644 --- a/tests/test_api/test_client/test_base_bot.py +++ b/tests/test_api/test_client/test_base_bot.py @@ -3,7 +3,6 @@ import copy import pytest from asynctest import CoroutineMock, patch -from aiogram import Bot from aiogram.api.client.base import BaseBot from aiogram.api.client.session.aiohttp import AiohttpSession from aiogram.api.methods import GetMe @@ -22,6 +21,7 @@ class TestBaseBot: def test_equals(self): base_bot = BaseBot("42:TEST") assert base_bot == BaseBot("42:TEST") + assert base_bot != "42:TEST" @pytest.mark.asyncio async def test_emit(self): diff --git a/tests/test_dispatcher/test_dispatcher.py b/tests/test_dispatcher/test_dispatcher.py index 80f2be46..974063b7 100644 --- a/tests/test_dispatcher/test_dispatcher.py +++ b/tests/test_dispatcher/test_dispatcher.py @@ -2,11 +2,12 @@ import datetime import time import pytest +from asynctest import MagicMock, patch + from aiogram import Bot from aiogram.api.types import Chat, Message, Update, User from aiogram.dispatcher.dispatcher import Dispatcher from aiogram.dispatcher.router import Router -from asynctest import MagicMock, patch class TestDispatcher: