From f195a1e7396b7eaa23ef6f14ffebb700cf741c75 Mon Sep 17 00:00:00 2001 From: 苏向夜 Date: Mon, 4 Mar 2024 17:56:12 +0800 Subject: test(workflow): add tests for workflow feature --- tests/test_handlers.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'tests/test_handlers.py') diff --git a/tests/test_handlers.py b/tests/test_handlers.py index ee96cdab..79810ce0 100644 --- a/tests/test_handlers.py +++ b/tests/test_handlers.py @@ -11,12 +11,11 @@ def test_handler(): return Output( "text", str(sum(list(map(int, input.get_plain_text().lstrip(".add").split())))), - status=0, block=False, ) def cmd(_: Input) -> Output: - return Output("text", "cmd", status=0, block=False) + return Output("text", "cmd", block=False) handler = Handler() handler.handlers = [ @@ -45,12 +44,11 @@ def test_handler_block(): return Output( "text", str(sum(list(map(int, input.get_plain_text().lstrip(".add").split())))), - status=0, block=False, ) def cmd(_: Input) -> Output: - return Output("text", "cmd", status=0, block=True) + return Output("text", "cmd", block=True) handler = Handler() handler.handlers = [ @@ -79,10 +77,9 @@ def test_handler_interator(): yield Output( "text", str(sum(list(map(int, input.get_plain_text().lstrip(".add").split())))), - status=0, block=False, ) - yield Output("text", "ok", status=0, block=False) + yield Output("text", "ok", block=False) handler = Handler() handler.handlers = [ -- cgit v1.2.3-70-g09d2