diff --git a/moto/datapipeline/responses.py b/moto/datapipeline/responses.py index a61ec2514..273543329 100644 --- a/moto/datapipeline/responses.py +++ b/moto/datapipeline/responses.py @@ -10,7 +10,11 @@ class DataPipelineResponse(BaseResponse): @property 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 def datapipeline_backend(self): diff --git a/tests/test_datapipeline/test_server.py b/tests/test_datapipeline/test_server.py index 0ff03aa8d..33a19c6f0 100644 --- a/tests/test_datapipeline/test_server.py +++ b/tests/test_datapipeline/test_server.py @@ -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': [] })