Modified into a more appropriate function

If the function includes none parameters, AssertIsNone() is more
appropriate than assertEqual()

Change-Id: I4155133694ca024c717209a9cb7cd6fd11d50f83
This commit is contained in:
guo yunxian 2016-07-29 16:32:28 +08:00
parent 4522829c98
commit 0306a4ae05
3 changed files with 3 additions and 3 deletions

View File

@ -559,7 +559,7 @@ class NetworksIpV6Test(NetworksTest):
# Verifies Subnet GW is set in IPv6
self.assertEqual(subnet1['gateway_ip'], ipv6_gateway)
# Verifies Subnet GW is None in IPv4
self.assertEqual(subnet2['gateway_ip'], None)
self.assertIsNone(subnet2['gateway_ip'])
# Verifies all 2 subnets in the same network
body = self.subnets_client.list_subnets()
subnets = [sub['id'] for sub in body['subnets']

View File

@ -244,7 +244,7 @@ class TestKeystoneV2AuthProvider(BaseAuthTestsSetUp):
# The original headers where empty
self.assertNotEqual(url, self.target_url)
self.assertIsNone(headers)
self.assertEqual(body, None)
self.assertIsNone(body)
def _test_request_with_alt_part_without_alt_data_no_change(self, body):
"""Test empty alternate auth data with no effect

View File

@ -146,5 +146,5 @@ class TestNegativeNegativeGenerator(base.TestCase, BaseNegativeGenerator):
schema_under_test = copy.copy(valid_schema)
expected_result = \
self.generator.generate_payload(test, schema_under_test)
self.assertEqual(expected_result, None)
self.assertIsNone(expected_result)
self._validate_result(valid_schema, schema_under_test)