Fix tests for server mode.

This commit is contained in:
Steve Pulec 2015-09-16 10:11:43 -04:00
parent 91a75570c6
commit b0ea9f2859
2 changed files with 10 additions and 4 deletions

View File

@ -10,7 +10,11 @@ class DataPipelineResponse(BaseResponse):
@property
def parameters(self):
# TODO this should really be moved to core/responses.py
if self.body:
return json.loads(self.body.decode("utf-8"))
else:
return self.querystring
@property
def datapipeline_backend(self):

View File

@ -16,10 +16,12 @@ def test_list_streams():
backend = server.create_backend_app("datapipeline")
test_client = backend.test_client()
res = test_client.get('/?Action=ListStreams')
res = test_client.post('/',
data={"pipelineIds": ["ASdf"]},
headers={"X-Amz-Target": "DataPipeline.DescribePipelines"},
)
json_data = json.loads(res.data.decode("utf-8"))
json_data.should.equal({
"HasMoreStreams": False,
"StreamNames": [],
'PipelineDescriptionList': []
})