Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update Test Suite to New Test Channel Setup #4435

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3093,7 +3093,7 @@ async def test_get_chat_member_count(self, bot, channel_id):
async def test_get_chat_member(self, bot, channel_id, chat_id):
chat_member = await bot.get_chat_member(channel_id, chat_id)

assert chat_member.status == "administrator"
assert chat_member.status == "creator"
assert chat_member.user.first_name == "PTB"
assert chat_member.user.last_name == "Test user"

Expand Down Expand Up @@ -3267,7 +3267,7 @@ async def test_promote_chat_member(self, bot, channel_id, monkeypatch):
with pytest.raises(BadRequest, match="Not enough rights"):
assert await bot.promote_chat_member(
channel_id,
95205500,
1325859552,
is_anonymous=True,
can_change_info=True,
can_post_messages=True,
Expand All @@ -3290,7 +3290,7 @@ async def make_assertion(*args, **_):
data = args[1]
return (
data.get("chat_id") == channel_id
and data.get("user_id") == 95205500
and data.get("user_id") == 1325859552
and data.get("is_anonymous") == 1
and data.get("can_change_info") == 2
and data.get("can_post_messages") == 3
Expand All @@ -3311,7 +3311,7 @@ async def make_assertion(*args, **_):
monkeypatch.setattr(bot, "_post", make_assertion)
assert await bot.promote_chat_member(
channel_id,
95205500,
1325859552,
is_anonymous=1,
can_change_info=2,
can_post_messages=3,
Expand Down
Loading