aiogram/tests/conftest.py
2019-12-04 18:04:29 +02:00

13 lines
234 B
Python

import pytest
from aiogram import Bot
from tests.mocked_bot import MockedBot
@pytest.fixture()
def bot():
bot = MockedBot()
token = Bot.set_current(bot)
yield bot
Bot.reset_current(token)
bot.me.invalidate(bot)