Added full support of Bot API 8.2

This commit is contained in:
JRoot Junior 2025-01-02 02:08:10 +02:00
parent 81550997f7
commit dc3851698c
No known key found for this signature in database
GPG key ID: 738964250D5FF6E2
39 changed files with 800 additions and 80 deletions

View 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

View 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

View 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

View 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