From c6cf9690d41c3045619a46d238faa2d6da8d5f14 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sat, 11 Jul 2015 20:28:10 +0000 Subject: [PATCH] Update mock assertion for mock 1.1 Mock 1.1 has a bug that prevents assert_has_calls() from working if the argument is not a list. Rather than wait for a bug fix, update the one test that is failing to pass a list instead of a single value. Change-Id: I559ad3e97a0b2fea69e11e3fc156a6afa2b4e3ae --- tests/ironic_lib/test_disk_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ironic_lib/test_disk_utils.py b/tests/ironic_lib/test_disk_utils.py index b00063d9..86a5c978 100644 --- a/tests/ironic_lib/test_disk_utils.py +++ b/tests/ironic_lib/test_disk_utils.py @@ -225,7 +225,7 @@ class MakePartitionsTestCase(test_base.BaseTestCase): self.ephemeral_mb, self.configdrive_mb) parted_call = mock.call(*cmd, run_as_root=True, check_exit_code=[0]) - mock_exc.assert_has_calls(parted_call) + mock_exc.assert_has_calls([parted_call]) @mock.patch.object(disk_utils, 'get_dev_block_size')