From f33dd2023b534fb215792687b916833408ab52aa Mon Sep 17 00:00:00 2001 From: RobertoRoos Date: Fri, 13 Sep 2024 13:17:09 +0200 Subject: [PATCH] Fixing unit tests --- tests/test_connection_class.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test_connection_class.py b/tests/test_connection_class.py index 710eabab..37ea40b9 100644 --- a/tests/test_connection_class.py +++ b/tests/test_connection_class.py @@ -231,11 +231,9 @@ def test_read_string(self): # Assert that the server received the correct command self.assert_command_id(requests[0], constants.ADSCOMMAND_READ) - # The string buffer is 1024 bytes long, this will be filled with \x0F - # and null terminated with \x00 by our test server. The \x00 will get - # chopped off during parsing to python string type - expected_result = "\x0F" * 1023 - self.assertEqual(result, expected_result) + # We are reading only a single character, which the test-server defaults at 0 + expected_result = "\x00" + self.assertEqual(expected_result, result) def test_write_uint(self): value = 100