Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Bibo-Joshi merged 1 commit intomasterfromfix-channel-tests
Aug 26, 2024
Merged
Changes fromall 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 deletionstests/test_bot.py
View file
Open in desktop
Original file line numberDiff line numberDiff 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 DownExpand 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

[8]ページ先頭

©2009-2025 Movatter.jp