Commit graph

43 commits

Author SHA1 Message Date
Dmitry Anfimov
64eb41db96
Fix warning about asyncio marker (#1078) 2022-12-30 22:48:53 +02:00
Oleg A
e065285857
fix: recover tests (#1004)
- applied pytest_async;
- fixed requirements;
- minor typos;
2022-09-18 15:32:42 +03:00
Oleg A
24e933bdde
Fix: default parent for __setitem__ (#806)
* fix: self is default parent

* chore: mv bot fixture

* chore: add update_chat test

* fix: string CHAT_PHOTO data
2022-02-08 02:30:41 +02:00
Ramzan Bekbulatov
f6f2972a11
Add to ChatMemberOwner new default fields (#645)
* new: add field type ConstField

* new: add const fields for ChatMemberOwner

* new: better typings for get_chat_administrators

* new: add tests for chat owner fields

* fix: Type typing for class

* enh: alias is_chat_owner for is_chat_creator
2021-07-31 21:47:37 +03:00
Oleg A
f18e4491c2
Telegram API 5.3 (#610)
* docs: api version update

* feat: personalized commands

* feat: custom placeholders

* refactor: ChatMember split

* fix: old names for ChatMemberStatus

* refactor: renamed kickChatMember to banChatMember

* style: align params

* refactor: renamed getChatMembersCount to getChatMemberCount (#614)

* feat: resolve ChatMember

* refactor: renamed BotCommandScopeTypes (similar to code style)

* refactor: resolve is a static method

* Construct BotCommandScope from type

* Make BotCommandScope classmethod instead of method

* Use classmethod for ChatMember resolve method

Co-authored-by: Hoi Dmytro <dmytro.hoi@gmail.com>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2021-07-04 23:52:55 +03:00
Oleg A
ee12911f24
pytest update; yield_fixture deprecation fix; event_loop removed (#479) 2021-01-10 20:53:59 +02:00
Oleg A
2b060d9ad4
Bot API 5.0 (#454)
* increased Telegram Bot API version

* AIOG-T-64 added logOut method

* AIOG-T-64 added logOut method test

* AIOG-T-64 logOut type annotation fix

* AIOG-T-65 added close (close_bot) method

* AIOG-T-65 old `close` method deprecation warn

* AIOG-T-65 `close_bot` test added

* AIOG-T-67 added ip_address param to set_webhook, updated docs

* updated deprecation text

Co-authored-by: Martin Winks <mpa@snejugal.ru>

* AIOG-T-69 param `drop_pending_updates` added in methods `setWebhook` and `deleteWebhook`

* AIOG-T-71 new `ChatLocation` class

* AIOG-T-70 updated `Chat` class: bio, linked chats, location

* AIOG-T-68 field `ip_address` added to class `WebhookInfo`

* AIOG-T-72 param `only_if_banned` added to `unbanChatMember` method

* AIOG-T-72 updated Chat.unban shortcut

* AIOG-T-73 field `file_name` added to `Audio` and `Video` classes

* AIOG-T-74 param `disable_content_type_detection` added in `sendDocument` method and `InputMediaDocument` class

* AIOG-T-75 Added the ability to pin messages in private chats (docs update)

* AIOG-T-76 Added the parameter message_id to the method unpinChatMessage to allow unpinning of the specific pinned message

* AIOG-T-77 Added the method unpinAllChatMessages, which can be used to unpin all pinned messages in a chat.

* AIOG-T-78 updated send_media_group description; added media qty check

* AIOG-T-80 field `live_period` added to `Location` class

* AIOG-T-81 Added support for live location heading

* AIOG-T-82 added the field proximity_alert_distance to the classes Location, InlineQueryResultLocation, InputLocationMessageContent; fixed heading in InputLocationMessageContent

* AIOG-T-82 added parameter proximity_alert_distance to the methods sendLocation and editMessageLiveLocation

* AIOG-T-83 Added the type ProximityAlertTriggered

* AIOG-T-83 Added field proximity_alert_triggered to the class Message

* AIOG-T-84 Added the field horizontal_accuracy to the classes Location, InlineQueryResultLocation, InputLocationMessageContent

* AIOG-T-84 Added the parameter horizontal_accuracy to the methods sendLocation and editMessageLiveLocation.

* Added live_period to InputLocationMessageContent (missed?)

* AIOG-T-85 Added the field sender_chat to the class Message

* AIOG-T-86 Added `is_anonymous` field to `chatMember` class

* AIOG-T-87 Added the parameter is_anonymous to the method promoteChatMember

* AIOG-T-89 Added the method `copyMessage`

* AIOG-T-90 Poll docs update

* AIOG-T-91 ability to manually specify text entities

* AIOG-T-92 Google Places as a venue API provider

* AIOG-T-93 Added the field allow_sending_without_reply to the methods

* AIOG-T-94 football and slot machine dice

* removed Optional

Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>

* Apply suggestions from code review

removed Optional

Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>

* Don't use deprecated Bot.close method from dispatcher (Replaced by session.close)

* Fix copyMessage method, update alias (with deprecation)
Fix imports

* AIOG-T-79: Easy way to use custom API server

* Update docs

* Bump requirements

* Rollback email

* AIOG-T-93 allow_sending_without_reply to send_message shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_photo shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_video shortcuts

* Union[type, None] -> Optional[type] refactoring

* AIOG-T-93 added allow_sending_without_reply to send_animation shortcuts

* added type hint to reply field

* AIOG-T-93 added allow_sending_without_reply to send_audio shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_document shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_sticker shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_video_note shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_voice shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_location shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_venue shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_contact shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_poll shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_dice shortcuts

* AIOG-T-93 added allow_sending_without_reply to send_media_group shortcuts

* AIOG-T-92 added google_place_ to send_venue shortcuts

* AIOG-T-91 added entities to send_message shortcuts

* AIOG-T-91 added caption_entities to send_photo shortcuts

* AIOG-T-91 added caption_entities to send_video shortcuts

* AIOG-T-91 added caption_entities to send_animation shortcuts

* AIOG-T-91 added caption_entities to send_audio shortcuts

* AIOG-T-91 added caption_entities to send_document shortcuts

* AIOG-T-91 added caption_entities to send_voice shortcuts

* AIOG-T-91 added explanation_parse_mode to send_poll shortcuts

* AIOG-T-91 added entities to edit_message_text shortcuts

* AIOG-T-91 added caption_entities to edit_message_caption shortcuts

* fixed types.MessageEntity -> MessageEntity in docs

Co-authored-by: Martin Winks <mpa@snejugal.ru>
Co-authored-by: Ramzan Bekbulatov <bekbulatov.ramzan@ya.ru>
Co-authored-by: Alex Root Junior <jroot.junior@gmail.com>
2020-11-08 17:51:39 +02:00
Oleg A
cd75d3c468 #296 Added test for getting bot's user_id 2020-04-07 09:43:11 +03:00
Oleg A
6cc769ce4f #289 Added setStickerSetThumb test 2020-04-05 19:13:33 +03:00
Oleg A
29d767bd78 #289 added getMyCommands test 2020-04-05 17:26:53 +03:00
Oleg A
a5f9373381 refactored message_dict to message_data in FakeTelegram 2020-04-05 17:02:43 +03:00
Oleg A
38a2309c32 #289 added setMyCommands test 2020-04-05 16:48:34 +03:00
Oleg A
0f245bbf56 #289 added sendDice test and dataset 2020-04-05 16:14:26 +03:00
Oleg A
13462abe47 test_bot minor refactoring 2020-04-05 15:52:01 +03:00
Alex Root Junior
19fc1b8d80 Bump deprecated util and fix warning from tests related with new permissions object. 2019-08-16 22:57:13 +03:00
Ilya Samartsev
5421982482 update exception matcher and fix tests 2019-06-02 14:39:17 +03:00
Alex Root Junior
d2232d127d Small changes in tests 2018-04-05 23:23:31 +03:00
Oleg Abramov
a1030145c9 Add editMessage and answerCallbackQ tests 2018-04-04 20:09:01 +03:00
Oleg Abramov
e58e084219 Add chat methods tests 2018-04-04 19:33:28 +03:00
Oleg Abramov
bd701c3768 Add exportChatInviteLink test 2018-04-04 18:47:32 +03:00
Oleg Abramov
dd559da6f4 Add promoteChatMember test 2018-04-04 18:17:43 +03:00
Oleg Abramov
3548febeaf Add restrictChatMember test 2018-04-04 18:14:42 +03:00
Oleg Abramov
28484d9352 Add unbanChatMember test 2018-04-04 18:12:21 +03:00
Oleg Abramov
90de8b2d4b Add kickChatMember test 2018-04-04 18:11:03 +03:00
Oleg Abramov
959f41a2f0 Add getFile test 2018-04-04 18:08:18 +03:00
Oleg Abramov
b95e977c12 Add getUserProfilePhotos test 2018-04-04 17:29:53 +03:00
Oleg Abramov
c0e4d480dd Add sendChatAction test 2018-04-04 17:09:20 +03:00
Oleg Abramov
3e77aa2775 Add sendContact test 2018-04-04 17:05:17 +03:00
Oleg Abramov
486978abe4 Add sendVenue test 2018-04-04 16:55:14 +03:00
Oleg Abramov
e3da438d9f Add editLocation and stopLocation test 2018-04-04 16:48:43 +03:00
Oleg Abramov
d1cea90979 Add sendLocation test 2018-04-04 16:31:48 +03:00
Oleg Abramov
21439b8532 Correct test names 2018-04-04 16:03:22 +03:00
Oleg Abramov
b689a084ed Add sendMediaGroup test 2018-04-04 16:00:55 +03:00
Oleg Abramov
6094fd13a3 Fixed test description (with file_id) 2018-04-04 13:51:18 +03:00
Oleg Abramov
5a7d01ae71 Added test sendVideoNote 2018-04-04 13:44:43 +03:00
Oleg Abramov
7af8d2da94 Added test sendVoice 2018-04-04 12:52:47 +03:00
Oleg Abramov
c49d9c35fe Added test sendVideo 2018-04-04 12:48:28 +03:00
Oleg Abramov
0c3ce1cf00 Added tests sendPhoto 2018-04-04 12:42:01 +03:00
Oleg Abramov
24a7788393 Added tests sendAudio, sendDocument. Added parse_mode descriptions to methods with caption 2018-04-04 11:26:43 +03:00
Oleg Abramov
c3e7728866 Pytest part two 2018-04-04 00:38:16 +03:00
Oleg Abramov
4ba810fe25 Test dataset filling 2018-04-03 22:38:46 +03:00
Oleg Abramov
210082691a First pytests 2018-04-03 20:58:22 +03:00
Alex Root Junior
f5a2d19e79 Test bot. // TODO 2017-12-01 02:01:35 +02:00