Skip to content

Commit 4227750

Browse files
author
Fabian Beitler
committed
Try fixing factory_lost_connection
1 parent f96a409 commit 4227750

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_client_async_asyncio.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def test_factory_protocol_lost_connection(self, mock_async):
112112
with mock.patch(
113113
'pymodbus.client.asynchronous.async_io.ReconnectingAsyncioModbusTcpClient._reconnect') as mock_reconnect:
114114
mock_reconnect.return_value = mock.sentinel.RECONNECT_GENERATOR
115-
client.protocol_lost_connection(mock.sentinel.PROTOCOL)
115+
await run_coroutine(client.protocol_lost_connection(mock.sentinel.PROTOCOL))
116116
if PYTHON_VERSION <= (3, 7):
117117
mock_async.assert_called_once_with(mock.sentinel.RECONNECT_GENERATOR, loop=mock_loop)
118118
assert not client.connected

0 commit comments

Comments
 (0)