From 24adb9406d7705c8655b480e222f6311462caf8c Mon Sep 17 00:00:00 2001 From: Eric Estabrooks Date: Mon, 23 Dec 2013 00:16:13 -0500 Subject: [PATCH 1/2] Return the StepSummaryList from this call --- boto/emr/connection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/boto/emr/connection.py b/boto/emr/connection.py index 9ec5b5695e..b4d8eec413 100644 --- a/boto/emr/connection.py +++ b/boto/emr/connection.py @@ -265,7 +265,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): """ From 32508a34ea79738ba44b3a872d545f448fe8cd90 Mon Sep 17 00:00:00 2001 From: Pascal Hakim Date: Wed, 22 Jan 2014 09:05:47 +1100 Subject: [PATCH 2/2] Fixed unit test for #1944 (StepSummaryList) --- tests/unit/emr/test_connection.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tests/unit/emr/test_connection.py b/tests/unit/emr/test_connection.py index 189e674143..8116a1211e 100644 --- a/tests/unit/emr/test_connection.py +++ b/tests/unit/emr/test_connection.py @@ -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 @@ -162,7 +162,7 @@ class TestListSteps(AWSMockServiceTestCase): connection_class = EmrConnection def default_body(self): - return """""" + return """Step 1""" def test_list_steps(self): self.set_http_response(200) @@ -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) @@ -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