Fix a wrong assertion method

Replace 'called_with' with 'assert_has_calls'.

Change-Id: Ie1c825750d892db53fcf7d6b04e91bc6fd5663e8
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
This commit is contained in:
Takashi Natsume 2022-10-15 16:55:39 +09:00
parent e2cd4a28c0
commit e62c3a6fea
1 changed files with 3 additions and 3 deletions

View File

@ -668,9 +668,9 @@ class TestAllocationListCreateDelete(tb.PlacementDbBaseTestCase):
mock_set.side_effect = side_effect
alloc_obj.replace_all(self.ctx, alloc_list)
self.assertEqual(2, mock_log.debug.call_count)
mock_log.debug.called_with(
'Retrying allocations write on resource provider '
'generation conflict')
mock_log.debug.assert_has_calls(
[mock.call('Retrying allocations write on resource provider '
'generation conflict')] * 2)
self.assertEqual(3, mock_set.call_count)
# Confirm we're using a different rp object after the change