Adjust Tests to Changed API Behavior (#3002)

This commit is contained in:
Bibo-Joshi 2022-05-07 21:47:50 +02:00 committed by GitHub
parent 95d6272d20
commit d917404de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View file

@ -2396,9 +2396,9 @@ class TestBot:
my_rights = ChatAdministratorRights.all_rights()
await bot.set_my_default_administrator_rights(my_rights, for_channels=True)
my_admin_rights_ch = await bot.get_my_default_administrator_rights(for_channels=True)
# tg bug? is_anonymous, can_invite_users is False despite setting it True for channels:
assert my_admin_rights_ch.can_invite_users is my_rights.can_invite_users
# tg bug? is_anonymous is False despite setting it True for channels:
assert my_admin_rights_ch.is_anonymous is not my_rights.is_anonymous
assert my_admin_rights_ch.can_invite_users is not my_rights.can_invite_users
assert my_admin_rights_ch.can_manage_chat is my_rights.can_manage_chat
assert my_admin_rights_ch.can_delete_messages is my_rights.can_delete_messages

View file

@ -103,7 +103,6 @@ class TestConstants:
)
@flaky(3, 1)
@pytest.mark.xfail(reason="Telegram apparently changed the limit without documenting it yet.")
async def test_max_caption_length(self, bot, chat_id):
good_caption = "a" * constants.MessageLimit.CAPTION_LENGTH
with data_file("telegram.png").open("rb") as f: