Using assertIsNone() instead of assertEqual(None)
Following OpenStack Style Guidelines[1]: 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: I8cbac0ae6eeddd8d12c2652acff16a370f2066bb
This commit is contained in:
parent
c82e388e83
commit
7874a8d103
@ -110,7 +110,7 @@ def get_inventory(clean=True, extra_args=None):
|
||||
class TestArgParser(unittest.TestCase):
|
||||
def test_no_args(self):
|
||||
arg_dict = dynamic_inventory.args([])
|
||||
self.assertEqual(arg_dict['config'], None)
|
||||
self.assertIsNone(arg_dict['config'])
|
||||
self.assertEqual(arg_dict['list'], False)
|
||||
|
||||
def test_list_arg(self):
|
||||
|
Loading…
Reference in New Issue
Block a user