fix syntax
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import asyncio
|
||||
import unittest
|
||||
from types import SimpleNamespace
|
||||
from typing import Any
|
||||
from unittest.mock import patch
|
||||
|
||||
from assistant_bot.jobs import post_init, post_shutdown
|
||||
@@ -10,11 +11,11 @@ class ReminderJobLifecycleTests(unittest.IsolatedAsyncioTestCase):
|
||||
async def test_reminder_task_is_cancelled_on_shutdown(self) -> None:
|
||||
started = asyncio.Event()
|
||||
|
||||
async def fake_reminder_loop(application) -> None:
|
||||
async def fake_reminder_loop(_application) -> None:
|
||||
started.set()
|
||||
await asyncio.Event().wait()
|
||||
|
||||
application = SimpleNamespace(bot_data={})
|
||||
application: Any = SimpleNamespace(bot_data={})
|
||||
with patch("assistant_bot.jobs.reminder_loop", fake_reminder_loop):
|
||||
await post_init(application)
|
||||
await started.wait()
|
||||
|
||||
Reference in New Issue
Block a user