Skip to content

Commit

Permalink
Merge remote-tracking branch 'pasc/emr_step_summary' into develop
Browse files Browse the repository at this point in the history
Fixes #2011.
  • Loading branch information
toastdriven committed Jan 22, 2014
2 parents 7c82f57 + 32508a3 commit d3af158
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion boto/emr/connection.py
Expand Up @@ -266,7 +266,7 @@ def list_steps(self, cluster_id, step_states=None, marker=None):
if step_states:
self.build_list_params(params, step_states, 'StepStateList.member')

self.get_object('ListSteps', params, StepSummaryList)
return self.get_object('ListSteps', params, StepSummaryList)

def add_tags(self, resource_id, tags):
"""
Expand Down
9 changes: 6 additions & 3 deletions tests/unit/emr/test_connection.py
Expand Up @@ -27,7 +27,7 @@
from tests.unit import AWSMockServiceTestCase

from boto.emr.connection import EmrConnection
from boto.emr.emrobject import JobFlowStepList
from boto.emr.emrobject import JobFlowStepList, StepSummaryList

# These tests are just checking the basic structure of
# the Elastic MapReduce code, by picking a few calls
Expand Down Expand Up @@ -162,7 +162,7 @@ class TestListSteps(AWSMockServiceTestCase):
connection_class = EmrConnection

def default_body(self):
return """<ListStepsOutput><Steps></Steps></ListStepsOutput>"""
return """<ListStepsOutput><Steps><member><Name>Step 1</Name></member></Steps></ListStepsOutput>"""

def test_list_steps(self):
self.set_http_response(200)
Expand All @@ -177,6 +177,8 @@ def test_list_steps(self):
'ClusterId': 'j-123',
'Version': '2009-03-31'
})
self.assertTrue(isinstance(response, StepSummaryList))
self.assertEqual(response.steps[0].name, 'Step 1')

def test_list_steps_with_states(self):
self.set_http_response(200)
Expand All @@ -193,7 +195,8 @@ def test_list_steps_with_states(self):
'StepStateList.member.2': 'FAILED',
'Version': '2009-03-31'
})

self.assertTrue(isinstance(response, StepSummaryList))
self.assertEqual(response.steps[0].name, 'Step 1')

class TestListBootstrapActions(AWSMockServiceTestCase):
connection_class = EmrConnection
Expand Down

0 comments on commit d3af158

Please sign in to comment.