From ef64a8b47deb8c8c8a49dd3a3c11d675979c91e0 Mon Sep 17 00:00:00 2001 From: Tang Chen Date: Fri, 19 Feb 2016 17:14:08 +0800 Subject: [PATCH] Use assertIsNone() instead of assertEqual(None, xxx) Change-Id: Ibbd7d6d27b2ff20304e3121fbadd5d50c1836d9b --- openstackclient/tests/network/v2/test_security_group.py | 4 ++-- .../tests/network/v2/test_security_group_rule.py | 4 ++-- openstackclient/tests/object/v1/test_container.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/openstackclient/tests/network/v2/test_security_group.py b/openstackclient/tests/network/v2/test_security_group.py index 98388ec7cb..72da14009c 100644 --- a/openstackclient/tests/network/v2/test_security_group.py +++ b/openstackclient/tests/network/v2/test_security_group.py @@ -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) diff --git a/openstackclient/tests/network/v2/test_security_group_rule.py b/openstackclient/tests/network/v2/test_security_group_rule.py index e07066329c..c6ef388461 100644 --- a/openstackclient/tests/network/v2/test_security_group_rule.py +++ b/openstackclient/tests/network/v2/test_security_group_rule.py @@ -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) diff --git a/openstackclient/tests/object/v1/test_container.py b/openstackclient/tests/object/v1/test_container.py index 5b0fb48a34..6982295de3 100644 --- a/openstackclient/tests/object/v1/test_container.py +++ b/openstackclient/tests/object/v1/test_container.py @@ -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(