This commit is contained in:
2025-11-04 11:21:35 +03:00
parent 7b85b0f08d
commit 4da876b774
16 changed files with 122 additions and 48 deletions
@@ -14,6 +14,7 @@ class TestAppIntegration(unittest.TestCase):
@self.router.command(Command("HELP", description="Show help"))
def help_cmd(response: Response):
print("Available commands: HELP")
_ = help_cmd # appease linter: function is registered via decorator
self.app.include_router(self.router)
@@ -22,5 +23,3 @@ class TestAppIntegration(unittest.TestCase):
with redirect_stdout(io.StringIO()) as stdout:
self.router.finds_appropriate_handler(InputCommand.parse("HELP"))
self.assertIn("Available commands:", stdout.getvalue())
@@ -15,6 +15,7 @@ class Service:
def hello(self) -> str:
return "world"
router = Router(title="DI")
@@ -56,5 +57,3 @@ class TestDIHandler(unittest.TestCase):
class _FakeApp:
# Minimal stub for setup_dishka; app object is not used in unit tests
registered_routers = []
@@ -20,5 +20,3 @@ class TestSimpleHandler(unittest.TestCase):
with redirect_stdout(io.StringIO()) as stdout:
router.finds_appropriate_handler(InputCommand.parse("PING"))
self.assertIn("PONG", stdout.getvalue())