Small changes in tests

This commit is contained in:
Alex Root Junior 2021-06-15 02:01:57 +03:00
parent 7f0a9d8097
commit 5296724a0f
2 changed files with 9 additions and 3 deletions

View file

@ -63,6 +63,8 @@ async def memory_storage():
def bot():
bot = MockedBot()
token = Bot.set_current(bot)
yield bot
Bot.reset_current(token)
bot.me.invalidate(bot)
try:
yield bot
finally:
Bot.reset_current(token)
bot.me.invalidate(bot)