From 1d9a500b727e8879cdaeb9c378ac717001c56ccc Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Sat, 27 Jan 2024 22:27:41 +0800 Subject: :sparkles: feat(router): supports alias router --- tests/test_handlers.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/test_handlers.py') diff --git a/tests/test_handlers.py b/tests/test_handlers.py index 00bb6f84..ee96cdab 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -1,7 +1,7 @@ from infini.handler import Handler from infini.input import Input from infini.output import Output -from infini.router import StartswithRouter +from infini.router import Startswith def test_handler(): @@ -22,12 +22,12 @@ def test_handler(): handler.handlers = [ { "priority": 2, - "router": StartswithRouter(".add"), + "router": Startswith(".add"), "handler": add, }, { "priority": 1, - "router": StartswithRouter("."), + "router": Startswith("."), "handler": cmd, }, ] @@ -56,12 +56,12 @@ def test_handler_block(): handler.handlers = [ { "priority": 2, - "router": StartswithRouter(".add"), + "router": Startswith(".add"), "handler": add, }, { "priority": 1, - "router": StartswithRouter("."), + "router": Startswith("."), "handler": cmd, }, ] @@ -88,7 +88,7 @@ def test_handler_interator(): handler.handlers = [ { "priority": 1, - "router": StartswithRouter(".add"), + "router": Startswith(".add"), "handler": add, }, ] -- cgit v1.2.3-70-g09d2