From 3b839753ec8252429d5110b8bdeab2303badb4a2 Mon Sep 17 00:00:00 2001 From: Raman Gupta <7243222+raman325@users.noreply.github.com> Date: Thu, 21 Sep 2023 00:54:05 -0400 Subject: [PATCH] fix tests --- test/test_client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/test_client.py b/test/test_client.py index 7ac43cf87..68cc64bfa 100644 --- a/test/test_client.py +++ b/test/test_client.py @@ -207,6 +207,7 @@ async def test_listen_not_success(client_session, url, result, driver_ready): """Test receive result message with success False on listen.""" result["success"] = False result["errorCode"] = "error_code" + result["message"] = "test" client = Client(url, client_session) await client.connect() @@ -222,6 +223,7 @@ async def test_initialize_not_success( """Test receive result message with success False on listen.""" initialize_data["success"] = False initialize_data["errorCode"] = "error_code" + initialize_data["message"] = "test" client = Client(url, client_session) await client.connect() @@ -237,6 +239,7 @@ async def test_get_log_config_not_success( """Test receive log config message with success False on listen.""" get_log_config_data["success"] = False get_log_config_data["errorCode"] = "error_code" + get_log_config_data["message"] = "test" client = Client(url, client_session) await client.connect() @@ -310,6 +313,7 @@ async def test_command_error_handling(client, mock_command): {"command": "some_command"}, { "errorCode": "unknown_command", + "message": "test" }, False, ) @@ -318,6 +322,7 @@ async def test_command_error_handling(client, mock_command): await client.async_send_command({"command": "some_command"}) assert raised.value.error_code == "unknown_command" + assert str(raised.value) == "unknown_command: test" mock_command( {"command": "some_zjs_command"},