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
(cherry picked from commit ca6ff4706b)
This commit is contained in:
Thomas Goirand 2024-02-26 11:55:32 +01:00 committed by Dmitry Tantsur
parent 76292d6f3b
commit ff55824534
1 changed files with 3 additions and 3 deletions

View File

@ -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)