From 391c3f7824d41d5622d318541e250a5c26b302e5 Mon Sep 17 00:00:00 2001 From: Nigel Dokter Date: Mon, 29 Jan 2024 14:22:31 +0100 Subject: [PATCH] fix protocol unit test for python3.12 --- test/test_protocol.py | 2 +- tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_protocol.py b/test/test_protocol.py index 1e7440b..7846b32 100644 --- a/test/test_protocol.py +++ b/test/test_protocol.py @@ -68,6 +68,6 @@ def test_receive_packet(self): # 2nd call of keep_alive should close the transport self.protocol.keep_alive() - assert mock_transport.close.called_once() + mock_transport.close.assert_called_once() self.protocol.connection_lost(None) diff --git a/tox.ini b/tox.ini index 533aa72..59d57e7 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ deps= pytest-asyncio pytest-mock dlms_cosem + setuptools commands= py.test --cov=dsmr_parser test {posargs} pylama dsmr_parser test