Fix tests for server mode.
This commit is contained in:
parent
91a75570c6
commit
b0ea9f2859
@ -10,7 +10,11 @@ class DataPipelineResponse(BaseResponse):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def parameters(self):
|
def parameters(self):
|
||||||
return json.loads(self.body.decode("utf-8"))
|
# 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
|
@property
|
||||||
def datapipeline_backend(self):
|
def datapipeline_backend(self):
|
||||||
|
@ -16,10 +16,12 @@ def test_list_streams():
|
|||||||
backend = server.create_backend_app("datapipeline")
|
backend = server.create_backend_app("datapipeline")
|
||||||
test_client = backend.test_client()
|
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 = json.loads(res.data.decode("utf-8"))
|
||||||
json_data.should.equal({
|
json_data.should.equal({
|
||||||
"HasMoreStreams": False,
|
'PipelineDescriptionList': []
|
||||||
"StreamNames": [],
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user