Reformat code

This commit is contained in:
Alex Root Junior 2019-11-19 22:44:40 +02:00
parent 23abe35212
commit d7a35f50a9
17 changed files with 22 additions and 7 deletions

View file

@ -1,6 +1,7 @@
from typing import Union
import pytest
from aiogram.api.methods import EditMessageMedia, Request
from aiogram.api.types import BufferedInputFile, InputMedia, InputMediaPhoto, Message
from tests.mocked_bot import MockedBot

View file

@ -2,6 +2,7 @@ import datetime
from typing import List
import pytest
from aiogram.api.methods import Request, SendMediaGroup
from aiogram.api.types import (
BufferedInputFile,

View file

@ -1,6 +1,7 @@
import datetime
import pytest
from aiogram.api.methods import Request, SendVideo
from aiogram.api.types import Chat, Message, Video
from tests.mocked_bot import MockedBot

View file

@ -1,6 +1,7 @@
import datetime
import pytest
from aiogram.api.methods import Request, SendVideoNote
from aiogram.api.types import BufferedInputFile, Chat, Message, VideoNote
from tests.mocked_bot import MockedBot

View file

@ -1,6 +1,7 @@
import datetime
import pytest
from aiogram.api.methods import Request, SendVoice
from aiogram.api.types import Chat, Message, Voice
from tests.mocked_bot import MockedBot

View file

@ -9,7 +9,7 @@ class TestSetChatDescription:
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True)
response: bool = await SetChatDescription(chat_id=-42, description='awesome chat')
response: bool = await SetChatDescription(chat_id=-42, description="awesome chat")
request: Request = bot.get_request()
assert request.method == "setChatDescription"
assert response == prepare_result.result
@ -18,7 +18,7 @@ class TestSetChatDescription:
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatDescription, ok=True, result=True)
response: bool = await bot.set_chat_description(chat_id=-42, description='awesome chat')
response: bool = await bot.set_chat_description(chat_id=-42, description="awesome chat")
request: Request = bot.get_request()
assert request.method == "setChatDescription"
assert response == prepare_result.result

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, SetChatPermissions
from aiogram.api.types import ChatPermissions
from tests.mocked_bot import MockedBot

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, SetChatPhoto
from aiogram.api.types import BufferedInputFile, InputFile
from tests.mocked_bot import MockedBot

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, SetChatStickerSet
from tests.mocked_bot import MockedBot

View file

@ -9,7 +9,7 @@ class TestSetChatTitle:
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True)
response: bool = await SetChatTitle(chat_id=-42, title='test chat')
response: bool = await SetChatTitle(chat_id=-42, title="test chat")
request: Request = bot.get_request()
assert request.method == "setChatTitle"
assert response == prepare_result.result
@ -18,7 +18,7 @@ class TestSetChatTitle:
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetChatTitle, ok=True, result=True)
response: bool = await bot.set_chat_title(chat_id=-42, title='test chat')
response: bool = await bot.set_chat_title(chat_id=-42, title="test chat")
request: Request = bot.get_request()
assert request.method == "setChatTitle"
assert response == prepare_result.result

View file

@ -1,6 +1,7 @@
from typing import Union
import pytest
from aiogram.api.methods import Request, SetGameScore
from aiogram.api.types import Message
from tests.mocked_bot import MockedBot

View file

@ -19,7 +19,9 @@ class TestSetPassportDataErrors:
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetPassportDataErrors, ok=True, result=True)
response: bool = await bot.set_passport_data_errors(user_id=42, errors=[PassportElementError()])
response: bool = await bot.set_passport_data_errors(
user_id=42, errors=[PassportElementError()]
)
request: Request = bot.get_request()
assert request.method == "setPassportDataErrors"
assert response == prepare_result.result

View file

@ -9,7 +9,7 @@ class TestSetStickerPositionInSet:
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True)
response: bool = await SetStickerPositionInSet(sticker='sticker', position=42)
response: bool = await SetStickerPositionInSet(sticker="sticker", position=42)
request: Request = bot.get_request()
assert request.method == "setStickerPositionInSet"
assert response == prepare_result.result
@ -18,7 +18,7 @@ class TestSetStickerPositionInSet:
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(SetStickerPositionInSet, ok=True, result=True)
response: bool = await bot.set_sticker_position_in_set(sticker='sticker', position=42)
response: bool = await bot.set_sticker_position_in_set(sticker="sticker", position=42)
request: Request = bot.get_request()
assert request.method == "setStickerPositionInSet"
assert response == prepare_result.result

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, SetWebhook
from tests.mocked_bot import MockedBot

View file

@ -1,6 +1,7 @@
from typing import Union
import pytest
from aiogram.api.methods import Request, StopMessageLiveLocation
from aiogram.api.types import Message
from tests.mocked_bot import MockedBot

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, StopPoll
from aiogram.api.types import Poll, PollOption
from tests.mocked_bot import MockedBot

View file

@ -1,4 +1,5 @@
import pytest
from aiogram.api.methods import Request, UploadStickerFile
from aiogram.api.types import BufferedInputFile, File
from tests.mocked_bot import MockedBot