fix syntax

This commit is contained in:
kandrusyak
2026-07-25 15:47:36 +03:00
parent 3f63d0305c
commit c04fb9480b
8 changed files with 56 additions and 32 deletions

View File

@@ -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()