Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken sync client test #1685

Merged
merged 2 commits into from
Jul 21, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/test_client_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down