pep8 fix: assertEquals -> assertEqual

Change is necessary due to update to hacking 0.8.0, which is in
alignment with project standards.

Change-Id: I012958e63d9e0efaf36ee57fe9102e835ef8533c
Closes-bug: #1218190
changes/55/61855/2
Jeff Peeler 9 years ago
parent 582cf8f047
commit a3a4d31d2e
  1. 8
      heat/tests/test_api_openstack_v1_views_stacks_view_builder.py
  2. 10
      heat/tests/test_version_negotiation_middleware.py
  3. 2
      test-requirements.txt

@ -37,14 +37,14 @@ class TestFormatStack(HeatTestCase):
result = stacks_view.format_stack(self.request, stack)
self.assertIn('stack_status', result)
self.assertEquals('CREATE_COMPLETE', result['stack_status'])
self.assertEqual('CREATE_COMPLETE', result['stack_status'])
def test_include_stack_status_with_no_action(self):
stack = {'stack_status': 'COMPLETE'}
result = stacks_view.format_stack(self.request, stack)
self.assertIn('stack_status', result)
self.assertEquals('COMPLETE', result['stack_status'])
self.assertEqual('COMPLETE', result['stack_status'])
@mock.patch.object(stacks_view, 'util')
def test_replace_stack_identity_with_id_and_links(self, mock_util):
@ -54,10 +54,10 @@ class TestFormatStack(HeatTestCase):
result = stacks_view.format_stack(self.request, stack)
self.assertIn('id', result)
self.assertNotIn('stack_identity', result)
self.assertEquals('foo', result['id'])
self.assertEqual('foo', result['id'])
self.assertIn('links', result)
self.assertEquals(['blah'], result['links'])
self.assertEqual(['blah'], result['links'])
def test_includes_all_other_keys(self):
stack = {'foo': 'bar'}

@ -78,8 +78,8 @@ class VersionNegotiationMiddlewareTest(HeatTestCase):
response = version_negotiation.process_request(request)
self.assertIsNone(response)
self.assertEquals(major_version, request.environ['api.major_version'])
self.assertEquals(minor_version, request.environ['api.minor_version'])
self.assertEqual(major_version, request.environ['api.major_version'])
self.assertEqual(minor_version, request.environ['api.minor_version'])
def test_removes_version_from_request_path(self):
version_negotiation = VersionNegotiationFilter(
@ -91,7 +91,7 @@ class VersionNegotiationMiddlewareTest(HeatTestCase):
response = version_negotiation.process_request(request)
self.assertIsNone(response)
self.assertEquals(expected_path, request.path_info_peek())
self.assertEqual(expected_path, request.path_info_peek())
def test_request_path_contains_unknown_version(self):
version_negotiation = VersionNegotiationFilter(
@ -114,8 +114,8 @@ class VersionNegotiationMiddlewareTest(HeatTestCase):
response = version_negotiation.process_request(request)
self.assertIsNone(response)
self.assertEquals(major_version, request.environ['api.major_version'])
self.assertEquals(minor_version, request.environ['api.minor_version'])
self.assertEqual(major_version, request.environ['api.major_version'])
self.assertEqual(minor_version, request.environ['api.minor_version'])
def test_accept_header_contains_unknown_version(self):
version_negotiation = VersionNegotiationFilter(

@ -2,7 +2,7 @@
pep8==1.4.5
pyflakes>=0.7.2,<0.7.4
flake8==2.0
hacking>=0.5.6,<0.8
hacking>=0.8.0,<0.9
coverage>=3.6
discover

Loading…
Cancel
Save