Using assertIsNone() is preferred over assertEqual()
Following OpenStack Style Guidelines: http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises [H203] Unit test assertions tend to give better messages for more specific assertions. As a result, assertIsNone(...) is preferred over assertEqual(None, ...) Change-Id: Id34fb0851d698ed9c1c77cbb230f32aa21678c4e
This commit is contained in:
parent
52b2d2fa51
commit
8429c01ce9
|
@ -703,7 +703,7 @@ class WholeDiskPartitionTestCases(test_base.BaseTestCase):
|
|||
result = disk_utils._get_labelled_partition(self.dev,
|
||||
self.config_part_label,
|
||||
self.node_uuid)
|
||||
self.assertEqual(None, result)
|
||||
self.assertIsNone(result)
|
||||
execute_calls = [
|
||||
mock.call('partprobe', self.dev, run_as_root=True),
|
||||
mock.call('blkid', '-o', 'device', self.dev, '-t',
|
||||
|
|
Loading…
Reference in New Issue