From ca6ff4706ba397243233d8adc5b7a20f3ee3a87a Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Mon, 26 Feb 2024 11:55:32 +0100 Subject: [PATCH] Use assert_not_called IPA still has 3 occurences of not_called() which are failing for me when building the Ironic Debian package in Debian Unstable (ie: with Python 3.12). This patch uses assert_not_called() instead of not_called(), fixing the problem. Change-Id: I8bd27fa706b298b28ef5bef405134a2c9803d757 --- ironic_python_agent/tests/unit/test_netutils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ironic_python_agent/tests/unit/test_netutils.py b/ironic_python_agent/tests/unit/test_netutils.py index 90dbd55d4..21bf3a4ab 100644 --- a/ironic_python_agent/tests/unit/test_netutils.py +++ b/ironic_python_agent/tests/unit/test_netutils.py @@ -224,7 +224,7 @@ class TestNetutils(base.IronicAgentTest): sock2.bind.assert_called_with(('eth1', netutils.LLDP_ETHERTYPE)) sock1.recv.assert_called_with(1600) - sock2.recv.not_called() + sock2.recv.assert_not_called() self.assertEqual(1, sock1.close.call_count) self.assertEqual(1, sock2.close.call_count) @@ -261,8 +261,8 @@ class TestNetutils(base.IronicAgentTest): sock1.bind.assert_called_with(('eth0', netutils.LLDP_ETHERTYPE)) sock2.bind.assert_called_with(('eth1', netutils.LLDP_ETHERTYPE)) - sock1.recv.not_called() - sock2.recv.not_called() + sock1.recv.assert_not_called() + sock2.recv.assert_not_called() self.assertEqual(1, sock1.close.call_count) self.assertEqual(1, sock2.close.call_count)