Replace assertEqual(None, *) with assertIsNone in tests
Replace assertEqual(None, *) with assertIsNone in tests to have more clear messages in case of failure. Change-Id: I5f40d8a0ec6e7ec24a20a183c5313d6dac52dbfe Closes-bug: #1280522
This commit is contained in:
parent
600032aca6
commit
3ed0dc8b7b
|
@ -66,9 +66,8 @@ class StormPluginTest(base.SaharaWithDbTestCase):
|
|||
plugin = pb.PLUGINS.get_plugin(cluster.plugin_name)
|
||||
supervisor_id = [node.id for node in cluster.node_groups
|
||||
if node.name == 'supervisor']
|
||||
self.assertEqual(None,
|
||||
plugin._validate_existing_ng_scaling(cluster,
|
||||
supervisor_id))
|
||||
self.assertIsNone(plugin._validate_existing_ng_scaling(cluster,
|
||||
supervisor_id))
|
||||
|
||||
def test_validate_additional_ng_scaling(self):
|
||||
data = {'name': "cluster",
|
||||
|
@ -97,9 +96,9 @@ class StormPluginTest(base.SaharaWithDbTestCase):
|
|||
plugin = pb.PLUGINS.get_plugin(cluster.plugin_name)
|
||||
supervisor_id = [node.id for node in cluster.node_groups
|
||||
if node.name == 'supervisor']
|
||||
self.assertEqual(None,
|
||||
plugin._validate_additional_ng_scaling(cluster,
|
||||
supervisor_id))
|
||||
self.assertIsNone(plugin._validate_additional_ng_scaling(cluster,
|
||||
supervisor_id)
|
||||
)
|
||||
|
||||
def test_validate_existing_ng_scaling_raises(self):
|
||||
data = {'name': "cluster",
|
||||
|
|
|
@ -101,4 +101,4 @@ class TestUtils(base.SaharaWithDbTestCase):
|
|||
|
||||
cl = tu.create_cluster('cl1', 't1', 'vanilla', '2.6.0',
|
||||
[self.ng_manager])
|
||||
self.assertEqual(None, u.get_secondarynamenode(cl))
|
||||
self.assertIsNone(u.get_secondarynamenode(cl))
|
||||
|
|
Loading…
Reference in New Issue