Use assertIsNone() instead of assertEqual(None, xxx)

Change-Id: Ibbd7d6d27b2ff20304e3121fbadd5d50c1836d9b
This commit is contained in:
Tang Chen 2016-02-19 17:14:08 +08:00
parent 444fc6149d
commit ef64a8b47d
3 changed files with 7 additions and 7 deletions

View File

@ -61,7 +61,7 @@ class TestDeleteSecurityGroupNetwork(TestSecurityGroup):
self.network.delete_security_group.assert_called_with(
self._security_group)
self.assertEqual(None, result)
self.assertIsNone(result)
class TestDeleteSecurityGroupCompute(TestSecurityGroup):
@ -96,4 +96,4 @@ class TestDeleteSecurityGroupCompute(TestSecurityGroup):
self.compute.security_groups.delete.assert_called_with(
self._security_group.id)
self.assertEqual(None, result)
self.assertIsNone(result)

View File

@ -67,7 +67,7 @@ class TestDeleteSecurityGroupRuleNetwork(TestSecurityGroupRuleNetwork):
self.network.delete_security_group_rule.assert_called_with(
self._security_group_rule)
self.assertEqual(None, result)
self.assertIsNone(result)
class TestDeleteSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
@ -97,4 +97,4 @@ class TestDeleteSecurityGroupRuleCompute(TestSecurityGroupRuleCompute):
self.compute.security_group_rules.delete.assert_called_with(
self._security_group_rule.id)
self.assertEqual(None, result)
self.assertIsNone(result)

View File

@ -67,7 +67,7 @@ class TestContainerDelete(TestContainer):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.assertEqual(None, self.cmd.take_action(parsed_args))
self.assertIsNone(self.cmd.take_action(parsed_args))
kwargs = {}
c_mock.assert_called_with(
@ -92,7 +92,7 @@ class TestContainerDelete(TestContainer):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.assertEqual(None, self.cmd.take_action(parsed_args))
self.assertIsNone(self.cmd.take_action(parsed_args))
kwargs = {}
c_mock.assert_called_with(
@ -120,7 +120,7 @@ class TestContainerDelete(TestContainer):
]
parsed_args = self.check_parser(self.cmd, arglist, verifylist)
self.assertEqual(None, self.cmd.take_action(parsed_args))
self.assertIsNone(self.cmd.take_action(parsed_args))
kwargs = {}
c_mock.assert_called_with(