Skip to content

Commit

Permalink
Fix tests and linting
Browse files Browse the repository at this point in the history
  • Loading branch information
szobov committed Apr 8, 2024
1 parent 2d2fde4 commit 89955f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion anker/bot/sticker_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def get_sticker_set(
bot: telebot.TeleBot, sticker_set_name: str
) -> telebot.types.StickerSet | None:
try:
# A workaround an issue described here: https://github.com/eternnoir/pyTelegramBotAPI/issues/2212
# A workaround an issue described here:
# https://github.com/eternnoir/pyTelegramBotAPI/issues/2212
is_workaround = True
if is_workaround:
result = telebot.apihelper.get_sticker_set(bot.token, sticker_set_name)
Expand Down
4 changes: 3 additions & 1 deletion tests/bot/test_message_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def test_process_start(
content_type="text/html",
)

with patch("telebot.apihelper._make_request") as mocked_make_handler:
with patch("telebot.apihelper._make_request") as mocked_make_handler, patch(
"anker.bot.sticker_storage.get_sticker_set"
):
process_start(mocked_telebot, incomming_message)
mocked_make_handler.assert_called_once()
mocked_telebot.reply_to.assert_called_once()
Expand Down

0 comments on commit 89955f9

Please sign in to comment.