mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Dev 3.x api 4.8 (#317)
* AIOG-T-20 Bot API 4.8 * AIOG-T-20 Update aliases * AIOG-T-20 Add parse mode passing in sendPoll method * AIOG-T-20 Small changes in docs * AIOG-T-20 Revert overriding remove keyboard default value and add tests * AIOG-T-20 Bot API 4.8
This commit is contained in:
parent
15bcc0ba9f
commit
6be0b36305
104 changed files with 312 additions and 175 deletions
|
|
@ -398,7 +398,7 @@ class TestMessage:
|
|||
message_id=42,
|
||||
date=datetime.datetime.now(),
|
||||
chat=Chat(id=42, type="private"),
|
||||
dice=Dice(value=6),
|
||||
dice=Dice(value=6, emoji="X"),
|
||||
from_user=User(id=42, is_bot=False, first_name="Test"),
|
||||
),
|
||||
ContentType.DICE,
|
||||
|
|
|
|||
20
tests/test_api/test_types/test_reply_keyboard_remove.py
Normal file
20
tests/test_api/test_types/test_reply_keyboard_remove.py
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
import pytest
|
||||
from aiogram.api.types import ReplyKeyboardRemove
|
||||
|
||||
|
||||
class TestReplyKeyboardRemove:
|
||||
"""
|
||||
This test is needed to prevent to override value by code generator
|
||||
"""
|
||||
|
||||
def test_remove_keyboard_default_is_true(self):
|
||||
assert (
|
||||
ReplyKeyboardRemove.__fields__["remove_keyboard"].default is True
|
||||
), "Remove keyboard has incorrect default value!"
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"kwargs,expected",
|
||||
[[{}, True], [{"remove_keyboard": True}, True], [{"remove_keyboard": False}, False]],
|
||||
)
|
||||
def test_remove_keyboard_values(self, kwargs, expected):
|
||||
assert ReplyKeyboardRemove(**kwargs).remove_keyboard is expected
|
||||
Loading…
Add table
Add a link
Reference in a new issue