mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Co-authored-by: Belavin Denis <belavin.d.andreevich@yandex.ru>
This commit is contained in:
parent
a8dfe86358
commit
1389ca5874
2 changed files with 44 additions and 5 deletions
42
tests/types/test_input_media.py
Normal file
42
tests/types/test_input_media.py
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
from aiogram import types
|
||||
from .dataset import AUDIO, ANIMATION, \
|
||||
DOCUMENT, PHOTO, VIDEO
|
||||
|
||||
|
||||
WIDTH = 'width'
|
||||
HEIGHT = 'height'
|
||||
|
||||
input_media_audio = types.InputMediaAudio(
|
||||
types.Audio(**AUDIO))
|
||||
input_media_animation = types.InputMediaAnimation(
|
||||
types.Animation(**ANIMATION))
|
||||
input_media_document = types.InputMediaDocument(
|
||||
types.Document(**DOCUMENT))
|
||||
input_media_video = types.InputMediaVideo(
|
||||
types.Video(**VIDEO))
|
||||
input_media_photo = types.InputMediaPhoto(
|
||||
types.PhotoSize(**PHOTO))
|
||||
|
||||
|
||||
def test_field_width():
|
||||
"""
|
||||
https://core.telegram.org/bots/api#inputmedia
|
||||
"""
|
||||
assert not hasattr(input_media_audio, WIDTH)
|
||||
assert not hasattr(input_media_document, WIDTH)
|
||||
assert not hasattr(input_media_photo, WIDTH)
|
||||
|
||||
assert hasattr(input_media_animation, WIDTH)
|
||||
assert hasattr(input_media_video, WIDTH)
|
||||
|
||||
|
||||
def test_field_height():
|
||||
"""
|
||||
https://core.telegram.org/bots/api#inputmedia
|
||||
"""
|
||||
assert not hasattr(input_media_audio, HEIGHT)
|
||||
assert not hasattr(input_media_document, HEIGHT)
|
||||
assert not hasattr(input_media_photo, HEIGHT)
|
||||
|
||||
assert hasattr(input_media_animation, HEIGHT)
|
||||
assert hasattr(input_media_video, HEIGHT)
|
||||
Loading…
Add table
Add a link
Reference in a new issue