Remove warnings about pytest asyncio mode

This commit is contained in:
Alex Root Junior 2022-12-30 16:10:06 +02:00
parent a0dbbcfd5d
commit 655b3a2d48
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
134 changed files with 30 additions and 517 deletions

View file

@ -14,8 +14,6 @@ from aiogram.methods import GetFile, GetMe
from aiogram.types import File, PhotoSize from aiogram.types import File, PhotoSize
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestBot: class TestBot:
def test_init(self): def test_init(self):

View file

@ -15,8 +15,6 @@ from aiogram.methods import Request, TelegramMethod
from aiogram.types import UNSET, InputFile from aiogram.types import UNSET, InputFile
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class BareInputFile(InputFile): class BareInputFile(InputFile):
async def read(self, chunk_size: int): async def read(self, chunk_size: int):

View file

@ -27,8 +27,6 @@ from aiogram.methods import DeleteMessage, GetMe, TelegramMethod
from aiogram.types import UNSET, User from aiogram.types import UNSET, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class CustomSession(BaseSession): class CustomSession(BaseSession):
async def close(self): async def close(self):

View file

@ -1,15 +1,11 @@
import datetime import datetime
import logging import logging
import pytest
from aiogram.client.session.middlewares.request_logging import RequestLogging from aiogram.client.session.middlewares.request_logging import RequestLogging
from aiogram.methods import GetMe, SendMessage from aiogram.methods import GetMe, SendMessage
from aiogram.types import Chat, Message, User from aiogram.types import Chat, Message, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestRequestLogging: class TestRequestLogging:
async def test_use_middleware(self, bot: MockedBot, caplog): async def test_use_middleware(self, bot: MockedBot, caplog):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import AddStickerToSet, Request from aiogram.methods import AddStickerToSet, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestAddStickerToSet: class TestAddStickerToSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import AnswerCallbackQuery, Request from aiogram.methods import AnswerCallbackQuery, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestAnswerCallbackQuery: class TestAnswerCallbackQuery:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,12 +1,8 @@
import pytest
from aiogram import Bot from aiogram import Bot
from aiogram.methods import AnswerInlineQuery, Request from aiogram.methods import AnswerInlineQuery, Request
from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent from aiogram.types import InlineQueryResult, InlineQueryResultPhoto, InputTextMessageContent
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestAnswerInlineQuery: class TestAnswerInlineQuery:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import AnswerPreCheckoutQuery, Request from aiogram.methods import AnswerPreCheckoutQuery, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestAnswerPreCheckoutQuery: class TestAnswerPreCheckoutQuery:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import AnswerShippingQuery, Request from aiogram.methods import AnswerShippingQuery, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestAnswerShippingQuery: class TestAnswerShippingQuery:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,12 +1,9 @@
import pytest
from aiogram.methods import AnswerWebAppQuery, Request from aiogram.methods import AnswerWebAppQuery, Request
from aiogram.types import InlineQueryResult, SentWebAppMessage from aiogram.types import InlineQueryResult, SentWebAppMessage
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestAnswerWebAppQuery: class TestAnswerWebAppQuery:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage())
@ -19,7 +16,6 @@ class TestAnswerWebAppQuery:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage()) prepare_result = bot.add_result_for(AnswerWebAppQuery, ok=True, result=SentWebAppMessage())

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import ApproveChatJoinRequest, Request from aiogram.methods import ApproveChatJoinRequest, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestApproveChatJoinRequest: class TestApproveChatJoinRequest:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True) prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=True)
@ -17,7 +14,6 @@ class TestApproveChatJoinRequest:
assert request.method == "approveChatJoinRequest" assert request.method == "approveChatJoinRequest"
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None) prepare_result = bot.add_result_for(ApproveChatJoinRequest, ok=True, result=None)

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import BanChatMember, Request from aiogram.methods import BanChatMember, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestKickChatMember: class TestKickChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import BanChatSenderChat, Request from aiogram.methods import BanChatSenderChat, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestBanChatSenderChat: class TestBanChatSenderChat:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True)
@ -18,7 +15,6 @@ class TestBanChatSenderChat:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True) prepare_result = bot.add_result_for(BanChatSenderChat, ok=True, result=True)

View file

@ -6,8 +6,6 @@ from aiogram import Bot
from aiogram.methods.base import prepare_parse_mode from aiogram.methods.base import prepare_parse_mode
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestPrepareFile: class TestPrepareFile:
# TODO: Add tests # TODO: Add tests

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Close, Request from aiogram.methods import Close, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestClose: class TestClose:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import CloseForumTopic, Request from aiogram.methods import CloseForumTopic, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestCloseForumTopic: class TestCloseForumTopic:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True)
@ -18,7 +15,6 @@ class TestCloseForumTopic:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(CloseForumTopic, ok=True, result=True)

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import CopyMessage, Request from aiogram.methods import CopyMessage, Request
from aiogram.types import MessageId from aiogram.types import MessageId
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestCopyMessage: class TestCopyMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import CreateChatInviteLink, Request from aiogram.methods import CreateChatInviteLink, Request
from aiogram.types import ChatInviteLink, User from aiogram.types import ChatInviteLink, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestCreateChatInviteLink: class TestCreateChatInviteLink:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,12 +1,9 @@
import pytest
from aiogram.methods import CreateForumTopic, Request from aiogram.methods import CreateForumTopic, Request
from aiogram.types import ForumTopic from aiogram.types import ForumTopic
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestCreateForumTopic: class TestCreateForumTopic:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
CreateForumTopic, CreateForumTopic,
@ -23,7 +20,6 @@ class TestCreateForumTopic:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
CreateForumTopic, CreateForumTopic,

View file

@ -1,12 +1,9 @@
import pytest
from aiogram.methods import CreateInvoiceLink, Request from aiogram.methods import CreateInvoiceLink, Request
from aiogram.types import LabeledPrice from aiogram.types import LabeledPrice
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestCreateInvoiceLink: class TestCreateInvoiceLink:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" CreateInvoiceLink, ok=True, result="https://t.me/invoice/example"
@ -24,7 +21,6 @@ class TestCreateInvoiceLink:
assert request.method == "createInvoiceLink" assert request.method == "createInvoiceLink"
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
CreateInvoiceLink, ok=True, result="https://t.me/invoice/example" CreateInvoiceLink, ok=True, result="https://t.me/invoice/example"

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import CreateNewStickerSet, Request from aiogram.methods import CreateNewStickerSet, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestCreateNewStickerSet: class TestCreateNewStickerSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import DeclineChatJoinRequest, Request from aiogram.methods import DeclineChatJoinRequest, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestDeclineChatJoinRequest: class TestDeclineChatJoinRequest:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True)
@ -17,7 +14,6 @@ class TestDeclineChatJoinRequest:
assert request.method == "declineChatJoinRequest" assert request.method == "declineChatJoinRequest"
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True) prepare_result = bot.add_result_for(DeclineChatJoinRequest, ok=True, result=True)

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteChatPhoto, Request from aiogram.methods import DeleteChatPhoto, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestDeleteChatPhoto: class TestDeleteChatPhoto:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteChatStickerSet, Request from aiogram.methods import DeleteChatStickerSet, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestDeleteChatStickerSet: class TestDeleteChatStickerSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import DeleteForumTopic, Request from aiogram.methods import DeleteForumTopic, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestDeleteForumTopic: class TestDeleteForumTopic:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True)
@ -18,7 +15,6 @@ class TestDeleteForumTopic:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(DeleteForumTopic, ok=True, result=True)

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteMessage, Request from aiogram.methods import DeleteMessage, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestDeleteMessage: class TestDeleteMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteMyCommands, Request from aiogram.methods import DeleteMyCommands, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestKickChatMember: class TestKickChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteStickerFromSet, Request from aiogram.methods import DeleteStickerFromSet, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestDeleteStickerFromSet: class TestDeleteStickerFromSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import DeleteWebhook, Request from aiogram.methods import DeleteWebhook, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestDeleteWebhook: class TestDeleteWebhook:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import EditChatInviteLink, Request from aiogram.methods import EditChatInviteLink, Request
from aiogram.types import ChatInviteLink, User from aiogram.types import ChatInviteLink, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditChatInviteLink: class TestEditChatInviteLink:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import EditForumTopic, Request from aiogram.methods import EditForumTopic, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestEditForumTopic: class TestEditForumTopic:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True)
@ -21,7 +18,6 @@ class TestEditForumTopic:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True) prepare_result = bot.add_result_for(EditForumTopic, ok=True, result=True)

View file

@ -1,14 +1,10 @@
import datetime import datetime
from typing import Union from typing import Union
import pytest
from aiogram.methods import EditMessageCaption, Request from aiogram.methods import EditMessageCaption, Request
from aiogram.types import Chat, Message from aiogram.types import Chat, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditMessageCaption: class TestEditMessageCaption:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import EditMessageLiveLocation, Request from aiogram.methods import EditMessageLiveLocation, Request
from aiogram.types import Message from aiogram.types import Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditMessageLiveLocation: class TestEditMessageLiveLocation:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import EditMessageMedia, Request from aiogram.methods import EditMessageMedia, Request
from aiogram.types import BufferedInputFile, InputMediaPhoto, Message from aiogram.types import BufferedInputFile, InputMediaPhoto, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditMessageMedia: class TestEditMessageMedia:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import EditMessageReplyMarkup, Request from aiogram.methods import EditMessageReplyMarkup, Request
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditMessageReplyMarkup: class TestEditMessageReplyMarkup:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import EditMessageText, Request from aiogram.methods import EditMessageText, Request
from aiogram.types import Message from aiogram.types import Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestEditMessageText: class TestEditMessageText:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import ExportChatInviteLink, Request from aiogram.methods import ExportChatInviteLink, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestExportChatInviteLink: class TestExportChatInviteLink:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import ForwardMessage, Request from aiogram.methods import ForwardMessage, Request
from aiogram.types import Chat, Message from aiogram.types import Chat, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestForwardMessage: class TestForwardMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetChat, Request from aiogram.methods import GetChat, Request
from aiogram.types import Chat from aiogram.types import Chat
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetChat: class TestGetChat:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetChatAdministrators, Request from aiogram.methods import GetChatAdministrators, Request
from aiogram.types import ChatMember, ChatMemberOwner, User from aiogram.types import ChatMember, ChatMemberOwner, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetChatAdministrators: class TestGetChatAdministrators:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetChatMember, Request from aiogram.methods import GetChatMember, Request
from aiogram.types import ChatMember, ChatMemberOwner, User from aiogram.types import ChatMember, ChatMemberOwner, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetChatMember: class TestGetChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import GetChatMemberCount, Request from aiogram.methods import GetChatMemberCount, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetChatMembersCount: class TestGetChatMembersCount:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,12 +1,9 @@
import pytest
from aiogram.methods import GetChatMenuButton, Request from aiogram.methods import GetChatMenuButton, Request
from aiogram.types import MenuButton, MenuButtonDefault from aiogram.types import MenuButton, MenuButtonDefault
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestGetChatMenuButton: class TestGetChatMenuButton:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault())
@ -16,7 +13,6 @@ class TestGetChatMenuButton:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault()) prepare_result = bot.add_result_for(GetChatMenuButton, ok=True, result=MenuButtonDefault())

View file

@ -1,14 +1,11 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetCustomEmojiStickers, Request from aiogram.methods import GetCustomEmojiStickers, Request
from aiogram.types import Sticker from aiogram.types import Sticker
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestGetCustomEmojiStickers: class TestGetCustomEmojiStickers:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
GetCustomEmojiStickers, GetCustomEmojiStickers,
@ -35,7 +32,6 @@ class TestGetCustomEmojiStickers:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
GetCustomEmojiStickers, GetCustomEmojiStickers,

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetFile, Request from aiogram.methods import GetFile, Request
from aiogram.types import File from aiogram.types import File
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetFile: class TestGetFile:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,14 +1,11 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetForumTopicIconStickers, Request from aiogram.methods import GetForumTopicIconStickers, Request
from aiogram.types import Sticker from aiogram.types import Sticker
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestGetForumTopicIconStickers: class TestGetForumTopicIconStickers:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[])
@ -18,7 +15,6 @@ class TestGetForumTopicIconStickers:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[]) prepare_result = bot.add_result_for(GetForumTopicIconStickers, ok=True, result=[])

View file

@ -1,13 +1,9 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetGameHighScores, Request from aiogram.methods import GetGameHighScores, Request
from aiogram.types import GameHighScore, User from aiogram.types import GameHighScore, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetGameHighScores: class TestGetGameHighScores:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetMe, Request from aiogram.methods import GetMe, Request
from aiogram.types import User from aiogram.types import User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetMe: class TestGetMe:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetMyCommands, Request from aiogram.methods import GetMyCommands, Request
from aiogram.types import BotCommand from aiogram.types import BotCommand
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetMyCommands: class TestGetMyCommands:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,12 +1,9 @@
import pytest
from aiogram.methods import GetMyDefaultAdministratorRights, Request from aiogram.methods import GetMyDefaultAdministratorRights, Request
from aiogram.types import ChatAdministratorRights from aiogram.types import ChatAdministratorRights
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestGetMyDefaultAdministratorRights: class TestGetMyDefaultAdministratorRights:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
GetMyDefaultAdministratorRights, GetMyDefaultAdministratorRights,
@ -29,7 +26,6 @@ class TestGetMyDefaultAdministratorRights:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for( prepare_result = bot.add_result_for(
GetMyDefaultAdministratorRights, GetMyDefaultAdministratorRights,

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetStickerSet, Request from aiogram.methods import GetStickerSet, Request
from aiogram.types import Sticker, StickerSet from aiogram.types import Sticker, StickerSet
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetStickerSet: class TestGetStickerSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import List from typing import List
import pytest
from aiogram.methods import GetUpdates, Request from aiogram.methods import GetUpdates, Request
from aiogram.types import Update from aiogram.types import Update
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetUpdates: class TestGetUpdates:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetUserProfilePhotos, Request from aiogram.methods import GetUserProfilePhotos, Request
from aiogram.types import PhotoSize, UserProfilePhotos from aiogram.types import PhotoSize, UserProfilePhotos
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetUserProfilePhotos: class TestGetUserProfilePhotos:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import GetWebhookInfo, Request from aiogram.methods import GetWebhookInfo, Request
from aiogram.types import WebhookInfo from aiogram.types import WebhookInfo
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestGetWebhookInfo: class TestGetWebhookInfo:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import LeaveChat, Request from aiogram.methods import LeaveChat, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestLeaveChat: class TestLeaveChat:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import LogOut, Request from aiogram.methods import LogOut, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestLogOut: class TestLogOut:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import PinChatMessage, Request from aiogram.methods import PinChatMessage, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestPinChatMessage: class TestPinChatMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import PromoteChatMember, Request from aiogram.methods import PromoteChatMember, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestPromoteChatMember: class TestPromoteChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import ReopenForumTopic, Request from aiogram.methods import ReopenForumTopic, Request
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestReopenForumTopic: class TestReopenForumTopic:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None)
@ -18,7 +15,6 @@ class TestReopenForumTopic:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None) prepare_result = bot.add_result_for(ReopenForumTopic, ok=True, result=None)

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, RestrictChatMember from aiogram.methods import Request, RestrictChatMember
from aiogram.types import ChatPermissions from aiogram.types import ChatPermissions
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestRestrictChatMember: class TestRestrictChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, RevokeChatInviteLink from aiogram.methods import Request, RevokeChatInviteLink
from aiogram.types import ChatInviteLink, User from aiogram.types import ChatInviteLink, User
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestRevokeChatInviteLink: class TestRevokeChatInviteLink:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendAnimation from aiogram.methods import Request, SendAnimation
from aiogram.types import Animation, Chat, Message from aiogram.types import Animation, Chat, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendAnimation: class TestSendAnimation:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendAudio from aiogram.methods import Request, SendAudio
from aiogram.types import Audio, Chat, Message from aiogram.types import Audio, Chat, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendAudio: class TestSendAudio:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.enums import ChatAction from aiogram.enums import ChatAction
from aiogram.methods import Request, SendChatAction from aiogram.methods import Request, SendChatAction
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendChatAction: class TestSendChatAction:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendContact from aiogram.methods import Request, SendContact
from aiogram.types import Chat, Contact, Message from aiogram.types import Chat, Contact, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendContact: class TestSendContact:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, SendDice from aiogram.methods import Request, SendDice
from aiogram.types import Message from aiogram.types import Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendDice: class TestSendDice:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendDocument from aiogram.methods import Request, SendDocument
from aiogram.types import Chat, Document, Message from aiogram.types import Chat, Document, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendDocument: class TestSendDocument:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendGame from aiogram.methods import Request, SendGame
from aiogram.types import Chat, Game, Message, PhotoSize from aiogram.types import Chat, Game, Message, PhotoSize
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendGame: class TestSendGame:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendInvoice from aiogram.methods import Request, SendInvoice
from aiogram.types import Chat, Invoice, LabeledPrice, Message from aiogram.types import Chat, Invoice, LabeledPrice, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendInvoice: class TestSendInvoice:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendLocation from aiogram.methods import Request, SendLocation
from aiogram.types import Chat, Location, Message from aiogram.types import Chat, Location, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendLocation: class TestSendLocation:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,8 +1,6 @@
import datetime import datetime
from typing import List from typing import List
import pytest
from aiogram.methods import Request, SendMediaGroup from aiogram.methods import Request, SendMediaGroup
from aiogram.types import ( from aiogram.types import (
BufferedInputFile, BufferedInputFile,
@ -15,8 +13,6 @@ from aiogram.types import (
) )
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendMediaGroup: class TestSendMediaGroup:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendMessage from aiogram.methods import Request, SendMessage
from aiogram.types import Chat, ForceReply, Message from aiogram.types import Chat, ForceReply, Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendMessage: class TestSendMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendPhoto from aiogram.methods import Request, SendPhoto
from aiogram.types import Chat, Message, PhotoSize from aiogram.types import Chat, Message, PhotoSize
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendPhoto: class TestSendPhoto:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendPoll from aiogram.methods import Request, SendPoll
from aiogram.types import Chat, Message, Poll, PollOption from aiogram.types import Chat, Message, Poll, PollOption
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendPoll: class TestSendPoll:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendSticker from aiogram.methods import Request, SendSticker
from aiogram.types import Chat, Message, Sticker from aiogram.types import Chat, Message, Sticker
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendSticker: class TestSendSticker:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendVenue from aiogram.methods import Request, SendVenue
from aiogram.types import Chat, Location, Message, Venue from aiogram.types import Chat, Location, Message, Venue
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendVenue: class TestSendVenue:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendVideo from aiogram.methods import Request, SendVideo
from aiogram.types import Chat, Message, Video from aiogram.types import Chat, Message, Video
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendVideo: class TestSendVideo:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendVideoNote from aiogram.methods import Request, SendVideoNote
from aiogram.types import BufferedInputFile, Chat, Message, VideoNote from aiogram.types import BufferedInputFile, Chat, Message, VideoNote
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendVideoNote: class TestSendVideoNote:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
import datetime import datetime
import pytest
from aiogram.methods import Request, SendVoice from aiogram.methods import Request, SendVoice
from aiogram.types import Chat, Message, Voice from aiogram.types import Chat, Message, Voice
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSendVoice: class TestSendVoice:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetChatAdministratorCustomTitle from aiogram.methods import Request, SetChatAdministratorCustomTitle
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatTitle: class TestSetChatTitle:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetChatDescription from aiogram.methods import Request, SetChatDescription
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatDescription: class TestSetChatDescription:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import Request, SetChatMenuButton from aiogram.methods import Request, SetChatMenuButton
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestSetChatMenuButton: class TestSetChatMenuButton:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True)
@ -15,7 +12,6 @@ class TestSetChatMenuButton:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True) prepare_result = bot.add_result_for(SetChatMenuButton, ok=True, result=True)

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, SetChatPermissions from aiogram.methods import Request, SetChatPermissions
from aiogram.types import ChatPermissions from aiogram.types import ChatPermissions
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatPermissions: class TestSetChatPermissions:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, SetChatPhoto from aiogram.methods import Request, SetChatPhoto
from aiogram.types import BufferedInputFile from aiogram.types import BufferedInputFile
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatPhoto: class TestSetChatPhoto:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetChatStickerSet from aiogram.methods import Request, SetChatStickerSet
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatStickerSet: class TestSetChatStickerSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetChatTitle from aiogram.methods import Request, SetChatTitle
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetChatTitle: class TestSetChatTitle:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import Request, SetGameScore from aiogram.methods import Request, SetGameScore
from aiogram.types import Message from aiogram.types import Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetGameScore: class TestSetGameScore:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, SetMyCommands from aiogram.methods import Request, SetMyCommands
from aiogram.types import BotCommand from aiogram.types import BotCommand
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetMyCommands: class TestSetMyCommands:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import Request, SetMyDefaultAdministratorRights from aiogram.methods import Request, SetMyDefaultAdministratorRights
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestSetMyDefaultAdministratorRights: class TestSetMyDefaultAdministratorRights:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True)
@ -15,7 +12,6 @@ class TestSetMyDefaultAdministratorRights:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True) prepare_result = bot.add_result_for(SetMyDefaultAdministratorRights, ok=True, result=True)

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, SetPassportDataErrors from aiogram.methods import Request, SetPassportDataErrors
from aiogram.types import PassportElementError from aiogram.types import PassportElementError
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetPassportDataErrors: class TestSetPassportDataErrors:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetStickerPositionInSet from aiogram.methods import Request, SetStickerPositionInSet
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetStickerPositionInSet: class TestSetStickerPositionInSet:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetStickerSetThumb from aiogram.methods import Request, SetStickerSetThumb
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetStickerSetThumb: class TestSetStickerSetThumb:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, SetWebhook from aiogram.methods import Request, SetWebhook
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestSetWebhook: class TestSetWebhook:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,13 +1,9 @@
from typing import Union from typing import Union
import pytest
from aiogram.methods import Request, StopMessageLiveLocation from aiogram.methods import Request, StopMessageLiveLocation
from aiogram.types import Message from aiogram.types import Message
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestStopMessageLiveLocation: class TestStopMessageLiveLocation:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,7 @@
import pytest
from aiogram.methods import Request, StopPoll from aiogram.methods import Request, StopPoll
from aiogram.types import Poll, PollOption from aiogram.types import Poll, PollOption
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestStopPoll: class TestStopPoll:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, UnbanChatMember from aiogram.methods import Request, UnbanChatMember
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestUnbanChatMember: class TestUnbanChatMember:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import Request, UnbanChatSenderChat from aiogram.methods import Request, UnbanChatSenderChat
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestUnbanChatSenderChat: class TestUnbanChatSenderChat:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True)
@ -18,7 +15,6 @@ class TestUnbanChatSenderChat:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True) prepare_result = bot.add_result_for(UnbanChatSenderChat, ok=True, result=True)

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, UnpinAllChatMessages from aiogram.methods import Request, UnpinAllChatMessages
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestUnpinAllChatMessages: class TestUnpinAllChatMessages:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

View file

@ -1,11 +1,8 @@
import pytest
from aiogram.methods import Request, UnpinAllForumTopicMessages from aiogram.methods import Request, UnpinAllForumTopicMessages
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
class TestUnpinAllForumTopicMessages: class TestUnpinAllForumTopicMessages:
@pytest.mark.asyncio
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True)
@ -18,7 +15,6 @@ class TestUnpinAllForumTopicMessages:
# assert request.data == {} # assert request.data == {}
assert response == prepare_result.result assert response == prepare_result.result
@pytest.mark.asyncio
async def test_bot_method(self, bot: MockedBot): async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True) prepare_result = bot.add_result_for(UnpinAllForumTopicMessages, ok=True, result=True)

View file

@ -1,10 +1,6 @@
import pytest
from aiogram.methods import Request, UnpinChatMessage from aiogram.methods import Request, UnpinChatMessage
from tests.mocked_bot import MockedBot from tests.mocked_bot import MockedBot
pytestmark = pytest.mark.asyncio
class TestUnpinChatMessage: class TestUnpinChatMessage:
async def test_method(self, bot: MockedBot): async def test_method(self, bot: MockedBot):

Some files were not shown because too many files have changed in this diff Show more