mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 02:03:04 +00:00
refactor: remove redundant pytest marks (#654)
This commit is contained in:
parent
fff33e4ac9
commit
f2f276b8cf
111 changed files with 221 additions and 256 deletions
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import AddStickerToSet, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestAddStickerToSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -16,7 +17,6 @@ class TestAddStickerToSet:
|
|||
assert request.method == "addStickerToSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AddStickerToSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import AnswerCallbackQuery, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestAnswerCallbackQuery:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestAnswerCallbackQuery:
|
|||
assert request.method == "answerCallbackQuery"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ from aiogram.methods import AnswerInlineQuery, Request
|
|||
from aiogram.types import InlineQueryResult, InlineQueryResultPhoto
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestAnswerInlineQuery:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True)
|
||||
|
||||
|
|
@ -18,7 +19,6 @@ class TestAnswerInlineQuery:
|
|||
assert request.method == "answerInlineQuery"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerInlineQuery, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import AnswerPreCheckoutQuery, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestAnswerPreCheckoutQuery:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestAnswerPreCheckoutQuery:
|
|||
assert request.method == "answerPreCheckoutQuery"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerPreCheckoutQuery, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import AnswerShippingQuery, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestAnswerShippingQuery:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestAnswerShippingQuery:
|
|||
assert request.method == "answerShippingQuery"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(AnswerShippingQuery, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import BanChatMember, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestKickChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestKickChatMember:
|
|||
assert request.method == "banChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(BanChatMember, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ from aiogram import Bot
|
|||
from aiogram.methods.base import prepare_parse_mode
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestPrepareFile:
|
||||
# TODO: Add tests
|
||||
|
|
@ -34,7 +36,6 @@ class TestPrepareParseMode:
|
|||
["Markdown", {"parse_mode": "HTML"}, "HTML"],
|
||||
],
|
||||
)
|
||||
@pytest.mark.asyncio
|
||||
async def test_default_parse_mode(
|
||||
self, bot: MockedBot, parse_mode: str, data: Dict[str, str], result: Optional[str]
|
||||
):
|
||||
|
|
@ -43,7 +44,6 @@ class TestPrepareParseMode:
|
|||
prepare_parse_mode(bot, data)
|
||||
assert data.get("parse_mode") == result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_list(self):
|
||||
data = [{}] * 2
|
||||
data.append({"parse_mode": "HTML"})
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Close, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestClose:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(Close, ok=True, result=True)
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ class TestClose:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(Close, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import CopyMessage, Request
|
|||
from aiogram.types import MessageId
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestCopyMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42))
|
||||
|
||||
|
|
@ -20,7 +21,6 @@ class TestCopyMessage:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(CopyMessage, ok=True, result=MessageId(message_id=42))
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import CreateChatInviteLink, Request
|
|||
from aiogram.types import ChatInviteLink, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestCreateChatInviteLink:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
CreateChatInviteLink,
|
||||
|
|
@ -27,7 +28,6 @@ class TestCreateChatInviteLink:
|
|||
# assert request.data == {"chat_id": -42}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
CreateChatInviteLink,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import CreateNewStickerSet, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestCreateNewStickerSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -16,7 +17,6 @@ class TestCreateNewStickerSet:
|
|||
assert request.method == "createNewStickerSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(CreateNewStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteChatPhoto, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestDeleteChatPhoto:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestDeleteChatPhoto:
|
|||
assert request.method == "deleteChatPhoto"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteChatPhoto, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteChatStickerSet, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestDeleteChatStickerSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestDeleteChatStickerSet:
|
|||
assert request.method == "deleteChatStickerSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteChatStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteMessage, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestDeleteMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestDeleteMessage:
|
|||
assert request.method == "deleteMessage"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteMessage, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteMyCommands, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestKickChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestKickChatMember:
|
|||
assert request.method == "deleteMyCommands"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteMyCommands, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteStickerFromSet, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestDeleteStickerFromSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestDeleteStickerFromSet:
|
|||
assert request.method == "deleteStickerFromSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteStickerFromSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import DeleteWebhook, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestDeleteWebhook:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestDeleteWebhook:
|
|||
assert request.method == "deleteWebhook"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(DeleteWebhook, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import EditChatInviteLink, Request
|
|||
from aiogram.types import ChatInviteLink, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditChatInviteLink:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
EditChatInviteLink,
|
||||
|
|
@ -27,7 +28,6 @@ class TestEditChatInviteLink:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
EditChatInviteLink,
|
||||
|
|
|
|||
|
|
@ -7,9 +7,10 @@ from aiogram.methods import EditMessageCaption, Request
|
|||
from aiogram.types import Chat, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditMessageCaption:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
EditMessageCaption,
|
||||
|
|
@ -27,7 +28,6 @@ class TestEditMessageCaption:
|
|||
assert request.method == "editMessageCaption"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
EditMessageCaption,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import EditMessageLiveLocation, Request
|
|||
from aiogram.types import Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditMessageLiveLocation:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True)
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ class TestEditMessageLiveLocation:
|
|||
assert request.method == "editMessageLiveLocation"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageLiveLocation, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import EditMessageMedia, Request
|
|||
from aiogram.types import BufferedInputFile, InputMediaPhoto, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditMessageMedia:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True)
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ class TestEditMessageMedia:
|
|||
assert request.method == "editMessageMedia"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageMedia, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import EditMessageReplyMarkup, Request
|
|||
from aiogram.types import InlineKeyboardButton, InlineKeyboardMarkup, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditMessageReplyMarkup:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True)
|
||||
|
||||
|
|
@ -25,7 +26,6 @@ class TestEditMessageReplyMarkup:
|
|||
assert request.method == "editMessageReplyMarkup"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageReplyMarkup, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import EditMessageText, Request
|
|||
from aiogram.types import Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestEditMessageText:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True)
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ class TestEditMessageText:
|
|||
assert request.method == "editMessageText"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(EditMessageText, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import ExportChatInviteLink, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestExportChatInviteLink:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
ExportChatInviteLink, ok=True, result="http://example.com"
|
||||
|
|
@ -16,7 +17,6 @@ class TestExportChatInviteLink:
|
|||
assert request.method == "exportChatInviteLink"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
ExportChatInviteLink, ok=True, result="http://example.com"
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import ForwardMessage, Request
|
|||
from aiogram.types import Chat, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestForwardMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
ForwardMessage,
|
||||
|
|
@ -27,7 +28,6 @@ class TestForwardMessage:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
ForwardMessage,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetChat, Request
|
|||
from aiogram.types import Chat
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetChat:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat")
|
||||
|
|
@ -17,7 +18,6 @@ class TestGetChat:
|
|||
assert request.method == "getChat"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChat, ok=True, result=Chat(id=-42, type="channel", title="chat")
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import GetChatAdministrators, Request
|
|||
from aiogram.types import ChatMember, ChatMemberOwner, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetChatAdministrators:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChatAdministrators,
|
||||
|
|
@ -25,7 +26,6 @@ class TestGetChatAdministrators:
|
|||
assert request.method == "getChatAdministrators"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChatAdministrators,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetChatMember, Request
|
|||
from aiogram.types import ChatMember, ChatMemberOwner, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChatMember,
|
||||
|
|
@ -21,7 +22,6 @@ class TestGetChatMember:
|
|||
assert request.method == "getChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetChatMember,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import GetChatMemberCount, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetChatMembersCount:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestGetChatMembersCount:
|
|||
assert request.method == "getChatMemberCount"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetChatMemberCount, ok=True, result=42)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import GetChatMembersCount, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetChatMembersCount:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestGetChatMembersCount:
|
|||
assert request.method == "getChatMembersCount"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetChatMembersCount, ok=True, result=42)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetFile, Request
|
|||
from aiogram.types import File
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetFile:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id")
|
||||
|
|
@ -17,7 +18,6 @@ class TestGetFile:
|
|||
assert request.method == "getFile"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetFile, ok=True, result=File(file_id="file id", file_unique_id="file id")
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import GetGameHighScores, Request
|
|||
from aiogram.types import GameHighScore, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetGameHighScores:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetGameHighScores,
|
||||
|
|
@ -25,7 +26,6 @@ class TestGetGameHighScores:
|
|||
assert request.method == "getGameHighScores"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetGameHighScores,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetMe, Request
|
|||
from aiogram.types import User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetMe:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User")
|
||||
|
|
@ -18,7 +19,6 @@ class TestGetMe:
|
|||
assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User")
|
||||
|
|
@ -29,7 +29,6 @@ class TestGetMe:
|
|||
assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_me_property(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetMe, ok=True, result=User(id=42, is_bot=False, first_name="User")
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import GetMyCommands, Request
|
|||
from aiogram.types import BotCommand
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetMyCommands:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestGetMyCommands:
|
|||
assert request.method == "getMyCommands"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetMyCommands, ok=True, result=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetStickerSet, Request
|
|||
from aiogram.types import Sticker, StickerSet
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetStickerSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetStickerSet,
|
||||
|
|
@ -33,7 +34,6 @@ class TestGetStickerSet:
|
|||
assert request.method == "getStickerSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetStickerSet,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import GetUpdates, Request
|
|||
from aiogram.types import Update
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetUpdates:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)])
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestGetUpdates:
|
|||
assert request.method == "getUpdates"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(GetUpdates, ok=True, result=[Update(update_id=42)])
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetUserProfilePhotos, Request
|
|||
from aiogram.types import PhotoSize, UserProfilePhotos
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetUserProfilePhotos:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetUserProfilePhotos,
|
||||
|
|
@ -24,7 +25,6 @@ class TestGetUserProfilePhotos:
|
|||
assert request.method == "getUserProfilePhotos"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetUserProfilePhotos,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import GetWebhookInfo, Request
|
|||
from aiogram.types import WebhookInfo
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestGetWebhookInfo:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetWebhookInfo,
|
||||
|
|
@ -21,7 +22,6 @@ class TestGetWebhookInfo:
|
|||
assert request.method == "getWebhookInfo"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
GetWebhookInfo,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import KickChatMember, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestKickChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestKickChatMember:
|
|||
assert request.method == "kickChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(KickChatMember, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import LeaveChat, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestLeaveChat:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestLeaveChat:
|
|||
assert request.method == "leaveChat"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(LeaveChat, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import LogOut, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestLogOut:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(LogOut, ok=True, result=True)
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ class TestLogOut:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(LogOut, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import PinChatMessage, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestPinChatMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestPinChatMessage:
|
|||
assert request.method == "pinChatMessage"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(PinChatMessage, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import PromoteChatMember, Request
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestPromoteChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestPromoteChatMember:
|
|||
assert request.method == "promoteChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(PromoteChatMember, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, RestrictChatMember
|
|||
from aiogram.types import ChatPermissions
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestRestrictChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestRestrictChatMember:
|
|||
assert request.method == "restrictChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(RestrictChatMember, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, RevokeChatInviteLink
|
|||
from aiogram.types import ChatInviteLink, User
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestRevokeChatInviteLink:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
RevokeChatInviteLink,
|
||||
|
|
@ -28,7 +29,6 @@ class TestRevokeChatInviteLink:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
RevokeChatInviteLink,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendAnimation
|
|||
from aiogram.types import Animation, Chat, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendAnimation:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendAnimation,
|
||||
|
|
@ -28,7 +29,6 @@ class TestSendAnimation:
|
|||
assert request.method == "sendAnimation"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendAnimation,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendAudio
|
|||
from aiogram.types import Audio, Chat, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendAudio:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendAudio,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendAudio:
|
|||
assert request.method == "sendAudio"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendAudio,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SendChatAction
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendChatAction:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSendChatAction:
|
|||
assert request.method == "sendChatAction"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SendChatAction, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendContact
|
|||
from aiogram.types import Chat, Contact, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendContact:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendContact,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendContact:
|
|||
assert request.method == "sendContact"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendContact,
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, SendDice
|
|||
from aiogram.types import Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendDice:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SendDice, ok=True, result=None)
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ class TestSendDice:
|
|||
assert request.method == "sendDice"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SendDice, ok=True, result=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendDocument
|
|||
from aiogram.types import Chat, Document, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendDocument:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendDocument,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendDocument:
|
|||
assert request.method == "sendDocument"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendDocument,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendGame
|
|||
from aiogram.types import Chat, Game, Message, PhotoSize
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendGame:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendGame,
|
||||
|
|
@ -32,7 +33,6 @@ class TestSendGame:
|
|||
assert request.method == "sendGame"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendGame,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendInvoice
|
|||
from aiogram.types import Chat, Invoice, LabeledPrice, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendInvoice:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendInvoice,
|
||||
|
|
@ -41,7 +42,6 @@ class TestSendInvoice:
|
|||
assert request.method == "sendInvoice"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendInvoice,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendLocation
|
|||
from aiogram.types import Chat, Location, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendLocation:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendLocation,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendLocation:
|
|||
assert request.method == "sendLocation"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendLocation,
|
||||
|
|
|
|||
|
|
@ -15,9 +15,10 @@ from aiogram.types import (
|
|||
)
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendMediaGroup:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendMediaGroup,
|
||||
|
|
@ -59,7 +60,6 @@ class TestSendMediaGroup:
|
|||
assert request.method == "sendMediaGroup"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendMediaGroup,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendMessage
|
|||
from aiogram.types import Chat, Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendMessage,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendMessage:
|
|||
assert request.method == "sendMessage"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendMessage,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendPhoto
|
|||
from aiogram.types import Chat, Message, PhotoSize
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendPhoto:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendPhoto,
|
||||
|
|
@ -28,7 +29,6 @@ class TestSendPhoto:
|
|||
assert request.method == "sendPhoto"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendPhoto,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendPoll
|
|||
from aiogram.types import Chat, Message, Poll, PollOption
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendPoll:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendPoll,
|
||||
|
|
@ -41,7 +42,6 @@ class TestSendPoll:
|
|||
assert request.method == "sendPoll"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendPoll,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendSticker
|
|||
from aiogram.types import Chat, Message, Sticker
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendSticker:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendSticker,
|
||||
|
|
@ -32,7 +33,6 @@ class TestSendSticker:
|
|||
assert request.method == "sendSticker"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendSticker,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendVenue
|
|||
from aiogram.types import Chat, Location, Message, Venue
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendVenue:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVenue,
|
||||
|
|
@ -38,7 +39,6 @@ class TestSendVenue:
|
|||
assert request.method == "sendVenue"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVenue,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendVideo
|
|||
from aiogram.types import Chat, Message, Video
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendVideo:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVideo,
|
||||
|
|
@ -28,7 +29,6 @@ class TestSendVideo:
|
|||
assert request.method == "sendVideo"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVideo,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendVideoNote
|
|||
from aiogram.types import BufferedInputFile, Chat, Message, VideoNote
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendVideoNote:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVideoNote,
|
||||
|
|
@ -30,7 +31,6 @@ class TestSendVideoNote:
|
|||
assert request.method == "sendVideoNote"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVideoNote,
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SendVoice
|
|||
from aiogram.types import Chat, Message, Voice
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSendVoice:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVoice,
|
||||
|
|
@ -26,7 +27,6 @@ class TestSendVoice:
|
|||
assert request.method == "sendVoice"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
SendVoice,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetChatAdministratorCustomTitle
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatTitle:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True)
|
||||
|
||||
|
|
@ -16,7 +17,6 @@ class TestSetChatTitle:
|
|||
assert request.method == "setChatAdministratorCustomTitle"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatAdministratorCustomTitle, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetChatDescription
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatDescription:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSetChatDescription:
|
|||
assert request.method == "setChatDescription"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, SetChatPermissions
|
|||
from aiogram.types import ChatPermissions
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatPermissions:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestSetChatPermissions:
|
|||
assert request.method == "setChatPermissions"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatPermissions, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, SetChatPhoto
|
|||
from aiogram.types import BufferedInputFile
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatPhoto:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestSetChatPhoto:
|
|||
assert request.method == "setChatPhoto"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatPhoto, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetChatStickerSet
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatStickerSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSetChatStickerSet:
|
|||
assert request.method == "setChatStickerSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatStickerSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetChatTitle
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetChatTitle:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSetChatTitle:
|
|||
assert request.method == "setChatTitle"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, SetGameScore
|
|||
from aiogram.types import Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetGameScore:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True)
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ class TestSetGameScore:
|
|||
assert request.method == "setGameScore"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetGameScore, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, SetMyCommands
|
|||
from aiogram.types import BotCommand
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetMyCommands:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestSetMyCommands:
|
|||
assert request.method == "setMyCommands"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetMyCommands, ok=True, result=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, SetPassportDataErrors
|
|||
from aiogram.types import PassportElementError
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetPassportDataErrors:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True)
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ class TestSetPassportDataErrors:
|
|||
assert request.method == "setPassportDataErrors"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetStickerPositionInSet
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetStickerPositionInSet:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSetStickerPositionInSet:
|
|||
assert request.method == "setStickerPositionInSet"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetStickerSetThumb
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetStickerSetThumb:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None)
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ class TestSetStickerSetThumb:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetStickerSetThumb, ok=True, result=None)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, SetWebhook
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestSetWebhook:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestSetWebhook:
|
|||
assert request.method == "setWebhook"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(SetWebhook, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ from aiogram.methods import Request, StopMessageLiveLocation
|
|||
from aiogram.types import Message
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestStopMessageLiveLocation:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True)
|
||||
|
||||
|
|
@ -19,7 +20,6 @@ class TestStopMessageLiveLocation:
|
|||
assert request.method == "stopMessageLiveLocation"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(StopMessageLiveLocation, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, StopPoll
|
|||
from aiogram.types import Poll, PollOption
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestStopPoll:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
StopPoll,
|
||||
|
|
@ -29,7 +30,6 @@ class TestStopPoll:
|
|||
assert request.method == "stopPoll"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
StopPoll,
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, UnbanChatMember
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestUnbanChatMember:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestUnbanChatMember:
|
|||
assert request.method == "unbanChatMember"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnbanChatMember, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, UnpinAllChatMessages
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestUnpinAllChatMessages:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True)
|
||||
|
||||
|
|
@ -17,7 +18,6 @@ class TestUnpinAllChatMessages:
|
|||
# assert request.data == {}
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnpinAllChatMessages, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@ import pytest
|
|||
from aiogram.methods import Request, UnpinChatMessage
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestUnpinChatMessage:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True)
|
||||
|
||||
|
|
@ -14,7 +15,6 @@ class TestUnpinChatMessage:
|
|||
assert request.method == "unpinChatMessage"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(UnpinChatMessage, ok=True, result=True)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ from aiogram.methods import Request, UploadStickerFile
|
|||
from aiogram.types import BufferedInputFile, File
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestUploadStickerFile:
|
||||
@pytest.mark.asyncio
|
||||
async def test_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id")
|
||||
|
|
@ -19,7 +20,6 @@ class TestUploadStickerFile:
|
|||
assert request.method == "uploadStickerFile"
|
||||
assert response == prepare_result.result
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(
|
||||
UploadStickerFile, ok=True, result=File(file_id="file id", file_unique_id="file id")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue