diff options
| author | 2024-01-26 15:04:21 +0800 | |
|---|---|---|
| committer | 2024-01-26 15:04:21 +0800 | |
| commit | 0250c8373c8ea12c6d12cf399a15c57f8690b032 (patch) | |
| tree | cb988940f3769bf05608cfb03d2a4832c4ce4302 /tests/test_interceptor.py | |
| parent | 0e8be9de58454de079d772dec6c0ef9c1774a775 (diff) | |
| download | infini-0250c8373c8ea12c6d12cf399a15c57f8690b032.tar.gz infini-0250c8373c8ea12c6d12cf399a15c57f8690b032.zip | |
:recycle: refactor(output): add __init__ method in Output class in order to generate output mehtod in initialization
Diffstat (limited to 'tests/test_interceptor.py')
| -rw-r--r-- | tests/test_interceptor.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/test_interceptor.py b/tests/test_interceptor.py index df5b6750..fb12beac 100644 --- a/tests/test_interceptor.py +++ b/tests/test_interceptor.py @@ -9,12 +9,7 @@ def test_interceptor(): valid_input = Input("这个叫苏向夜.") def intercept(_: Input) -> Input | Output: - output = Output() - output.block = True # TODO 拦截器阻塞标识 - output.name = "block.jianlvchun" - output.status = 0 - output.type = "text" - return output + return Output("text", "block.jianlvchun", block=True) # TODO 拦截器阻塞标识 interceptor = Interceptor() interceptor.interceptors = [ |
