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