From 6da48ca5456360245db6065082d9b845c62fd43c Mon Sep 17 00:00:00 2001 From: Alex Ruddick Date: Thu, 20 Jul 2023 17:36:21 -0500 Subject: [PATCH] Fix broken test --- test/test_client_sync.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/test_client_sync.py b/test/test_client_sync.py index f5bd762e9..381239168 100755 --- a/test/test_client_sync.py +++ b/test/test_client_sync.py @@ -200,7 +200,7 @@ class CustomRequest: # pylint: disable=too-few-public-methods client = ModbusTcpClient("127.0.0.1") client.framer = mock.Mock() client.register(CustomRequest) - assert client.framer.decoder.register.called_once_with(CustomRequest) + client.framer.decoder.register.assert_called_once_with(CustomRequest) # -----------------------------------------------------------------------# # Test TLS Client @@ -281,15 +281,15 @@ def test_tls_client_repr(self): def test_tls_client_register(self): """Test tls client.""" - class CustomeRequest: # pylint: disable=too-few-public-methods + class CustomRequest: # pylint: disable=too-few-public-methods """Dummy custom request.""" function_code = 79 client = ModbusTlsClient("127.0.0.1") client.framer = mock.Mock() - client.register(CustomeRequest) - assert client.framer.decoder.register.called_once_with(CustomeRequest) + client.register(CustomRequest) + client.framer.decoder.register.assert_called_once_with(CustomRequest) # -----------------------------------------------------------------------# # Test Serial Client