Update tests

This commit is contained in:
Alex Root Junior 2023-03-11 20:19:20 +02:00
parent 3bca050b8a
commit 0cb190e928
No known key found for this signature in database
GPG key ID: 074C1D455EBEA4AC
117 changed files with 230 additions and 1852 deletions

View file

@ -3,18 +3,9 @@ from tests.mocked_bot import MockedBot
class TestAnswerCallbackQuery:
async def test_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True)
response: bool = await AnswerCallbackQuery(callback_query_id="cq id", text="OK")
request: Request = bot.get_request()
assert request.method == "answerCallbackQuery"
assert response == prepare_result.result
async def test_bot_method(self, bot: MockedBot):
prepare_result = bot.add_result_for(AnswerCallbackQuery, ok=True, result=True)
response: bool = await bot.answer_callback_query(callback_query_id="cq id", text="OK")
request: Request = bot.get_request()
assert request.method == "answerCallbackQuery"
request = bot.get_request()
assert response == prepare_result.result