aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tests/TestRulePackage/tests.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-12-18 05:44:35 +0800
committer简律纯 <i@jyunko.cn>2023-12-18 05:44:35 +0800
commit477c9ccfe4451920838705ab4aba81b2b41d0c50 (patch)
tree2ec905a48016480d2d95d269327cee1cb0c9dfbc /tests/TestRulePackage/tests.py
parented6a2c4001309096f191953d8986b54c006c518d (diff)
downloadinfini-477c9ccfe4451920838705ab4aba81b2b41d0c50.tar.gz
infini-477c9ccfe4451920838705ab4aba81b2b41d0c50.zip
fix(template|tests): update command: new template
Diffstat (limited to 'tests/TestRulePackage/tests.py')
-rw-r--r--tests/TestRulePackage/tests.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/TestRulePackage/tests.py b/tests/TestRulePackage/tests.py
index 37a6a301..af1726a0 100644
--- a/tests/TestRulePackage/tests.py
+++ b/tests/TestRulePackage/tests.py
@@ -1,10 +1,12 @@
from infini.matcher import matcher, MatcherEvent
+
def test():
- event = MatcherEvent("MyRule")
+ event = MatcherEvent("rule.example_handler", string="测试")
try:
- matcher.run(event)
+ result = matcher.run(event)
+ assert result == "捕获到输入: 测试"
except Exception as error:
- return [error]
- finally:
- return []
+ return error
+ return []
+