mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support of Bot API 8.2 (#1623)
* Added full support of Bot API 8.2 * Added changelog * Try to add port * Add port to the `test_reset_connector`
This commit is contained in:
parent
81550997f7
commit
afccd8a38f
41 changed files with 811 additions and 85 deletions
12
tests/test_api/test_methods/test_remove_chat_verification.py
Normal file
12
tests/test_api/test_methods/test_remove_chat_verification.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from aiogram.methods import RemoveChatVerification, VerifyChat
|
||||
from aiogram.types import Poll
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestRemoveChatVerification:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(RemoveChatVerification, ok=True, result=True)
|
||||
|
||||
response: bool = await bot.remove_chat_verification(chat_id=42)
|
||||
request = bot.get_request()
|
||||
assert response == prepare_result.result
|
||||
12
tests/test_api/test_methods/test_remove_user_verification.py
Normal file
12
tests/test_api/test_methods/test_remove_user_verification.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from aiogram.methods import RemoveUserVerification, VerifyChat
|
||||
from aiogram.types import Poll
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestRemoveUserVerification:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(RemoveUserVerification, ok=True, result=True)
|
||||
|
||||
response: bool = await bot.remove_user_verification(user_id=42)
|
||||
request = bot.get_request()
|
||||
assert response == prepare_result.result
|
||||
12
tests/test_api/test_methods/test_verify_chat.py
Normal file
12
tests/test_api/test_methods/test_verify_chat.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from aiogram.methods import VerifyChat
|
||||
from aiogram.types import Poll
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestVerifyChat:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(VerifyChat, ok=True, result=True)
|
||||
|
||||
response: bool = await bot.verify_chat(chat_id=42)
|
||||
request = bot.get_request()
|
||||
assert response == prepare_result.result
|
||||
12
tests/test_api/test_methods/test_verify_user.py
Normal file
12
tests/test_api/test_methods/test_verify_user.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
from aiogram.methods import VerifyChat, VerifyUser
|
||||
from aiogram.types import Poll
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
|
||||
class TestVerifyUser:
|
||||
async def test_bot_method(self, bot: MockedBot):
|
||||
prepare_result = bot.add_result_for(VerifyUser, ok=True, result=True)
|
||||
|
||||
response: bool = await bot.verify_user(user_id=42)
|
||||
request = bot.get_request()
|
||||
assert response == prepare_result.result
|
||||
Loading…
Add table
Add a link
Reference in a new issue