diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-17 23:03:59 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-18 00:38:50 +0200 |
commit | e05f02acd583797ceb449fc501d371d45a4293c1 (patch) | |
tree | 491322cf633b67918f0361c1ce986f6b690844bc /test | |
parent | docker: sanitize package dependencies (diff) | |
download | cimple-e05f02acd583797ceb449fc501d371d45a4293c1.tar.gz cimple-e05f02acd583797ceb449fc501d371d45a4293c1.zip |
switch to JSON-RPC as message format
Instead of the weird `struct msg` I had, I switched to the JSON-RPC
format. It's basically the same, but has a well-defined semantics in
case of errors.
Diffstat (limited to 'test')
-rw-r--r-- | test/py/test_basic.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/py/test_basic.py b/test/py/test_basic.py index 7ac038c..eda12d0 100644 --- a/test/py/test_basic.py +++ b/test/py/test_basic.py @@ -47,18 +47,18 @@ def test_cmd_line_invalid_option(server_exe, worker_exe, client_exe): _test_cmd_line_invalid_option_internal(client_exe, 'client') -def test_run_client_no_msg(client): +def test_run_client_no_action(client): ec, output = client.try_run() assert ec != 0, f'Invalid exit code {ec}, output:\n{output}' - prefix = 'usage error: no message to send to the server\n' + prefix = 'usage error: no action specified\n' assert output.startswith(prefix), f'Invalid output:\n{output}' -def test_run_client_invalid_msg(server, client): +def test_run_client_invalid_request(server, client): ec, output = client.try_run('hello') assert ec != 0, f'Invalid exit code {ec}, output:\n{output}' - suffix = "Failed to connect to server or it couldn't process the request\n" - assert output.endswith(suffix), f'Invalid output:\n{output}' + prefix = 'usage error: invalid request\n' + assert output.startswith(prefix), f'Invalid output:\n{output}' def test_run_noop_server(server): |