mirror of
https://github.com/koloideal/Argenta.git
synced 2026-06-10 10:05:28 +03:00
docs
This commit is contained in:
@@ -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())
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user