Fix tests for server mode.
This commit is contained in:
parent
91a75570c6
commit
b0ea9f2859
@ -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):
|
||||
|
@ -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': []
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user