Skip to content

Commit 0b9f91c

Browse files
committed
Add new method test case.
1 parent 468a535 commit 0b9f91c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_telebot.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
if not should_skip:
1717
TOKEN = os.environ['TOKEN']
1818
CHAT_ID = os.environ['CHAT_ID']
19+
GROUP_ID = os.environ['GROUP_ID']
1920

2021

2122
@pytest.mark.skipif(should_skip, reason="No environment variables configured")
@@ -351,6 +352,21 @@ def test_edit_message_text(self):
351352
new_msg = tb.edit_message_text('Edit test', chat_id=CHAT_ID, message_id=msg.message_id)
352353
assert new_msg.text == 'Edit test'
353354

355+
def test_get_chat(self):
356+
tb = telebot.TeleBot(TOKEN)
357+
ch = tb.get_chat(GROUP_ID)
358+
assert ch.id == GROUP_ID
359+
360+
def test_get_chat_administrators(self):
361+
tb = telebot.TeleBot(TOKEN)
362+
cas = tb.get_chat_administrators(GROUP_ID)
363+
assert len(cas) > 1
364+
365+
def test_get_chat_members_count(self):
366+
tb = telebot.TeleBot(TOKEN)
367+
cn = tb.get_chat_members_count(GROUP_ID)
368+
assert cn > 1
369+
354370
def test_edit_markup(self):
355371
text = 'CI Test Message'
356372
tb = telebot.TeleBot(TOKEN)

0 commit comments

Comments
 (0)