From 618b94c7174b8c9c7c6d2ea29e6a11745a5cdac8 Mon Sep 17 00:00:00 2001 From: Takashi NATSUME Date: Thu, 14 Mar 2019 09:23:26 +0900 Subject: [PATCH] Fix misuse of assertTrue Replace assertTrue with assertEqual. Change-Id: I8bfbd171b3fb0d07b666420592df37392aad405c Story: 2005228 Task: 30010 --- ironic/tests/unit/drivers/modules/irmc/test_boot.py | 2 +- ironic/tests/unit/drivers/modules/irmc/test_inspect.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ironic/tests/unit/drivers/modules/irmc/test_boot.py b/ironic/tests/unit/drivers/modules/irmc/test_boot.py index f368d7fd94..3dd1001335 100644 --- a/ironic/tests/unit/drivers/modules/irmc/test_boot.py +++ b/ironic/tests/unit/drivers/modules/irmc/test_boot.py @@ -681,7 +681,7 @@ class IRMCDeployPrivateMethodsTestCase(test_common.BaseIRMCTest): _get_iso_name_mock.assert_has_calls( [mock.call(task.node, label='deploy'), mock.call(task.node, label='rescue')]) - self.assertTrue(_remove_share_file_mock.call_count, 3) + self.assertEqual(3, _remove_share_file_mock.call_count) _remove_share_file_mock.assert_has_calls( [mock.call(_get_floppy_image_name_mock(task.node)), mock.call(_get_iso_name_mock(task.node, label='deploy')), diff --git a/ironic/tests/unit/drivers/modules/irmc/test_inspect.py b/ironic/tests/unit/drivers/modules/irmc/test_inspect.py index 30a1818dc9..b0bd206a37 100644 --- a/ironic/tests/unit/drivers/modules/irmc/test_inspect.py +++ b/ironic/tests/unit/drivers/modules/irmc/test_inspect.py @@ -348,7 +348,7 @@ class IRMCInspectTestCase(test_common.BaseIRMCTest): _inspect_hardware_mock.assert_called_once_with(task.node, existing_traits) - self.assertTrue(port_mock.call_count, 2) + self.assertEqual(2, port_mock.call_count) task.node.refresh() self.assertEqual(inspected_props, task.node.properties) self.assertEqual(states.MANAGEABLE, result)