diff --git a/tests/test_bot/test_bot_download_file.py b/tests/test_bot/test_bot_download_file.py index 75710fcc..195a06f7 100644 --- a/tests/test_bot/test_bot_download_file.py +++ b/tests/test_bot/test_bot_download_file.py @@ -21,7 +21,8 @@ async def bot_fixture(): _bot = Bot(TOKEN) _bot.get_file = get_file yield _bot - await _bot.session.close() + session = await _bot.get_session() + await session.close() @pytest.fixture