Change CloudFormation to support Data Pipelines
This commit is contained in:
parent
0cef332840
commit
25f9e8b588
6 changed files with 143 additions and 10 deletions
|
|
@ -4,6 +4,7 @@ import boto.datapipeline
|
|||
import sure # noqa
|
||||
|
||||
from moto import mock_datapipeline
|
||||
from moto.datapipeline.utils import remove_capitalization_of_dict_keys
|
||||
|
||||
|
||||
def get_value_from_fields(key, fields):
|
||||
|
|
@ -144,13 +145,33 @@ def test_listing_pipelines():
|
|||
|
||||
response["HasMoreResults"].should.be(False)
|
||||
response["Marker"].should.be.none
|
||||
response["PipelineIdList"].should.equal([
|
||||
response["PipelineIdList"].should.have.length_of(2)
|
||||
response["PipelineIdList"].should.contain({
|
||||
"Id": res1["pipelineId"],
|
||||
"Name": "mypipeline1",
|
||||
})
|
||||
response["PipelineIdList"].should.contain({
|
||||
"Id": res2["pipelineId"],
|
||||
"Name": "mypipeline2"
|
||||
})
|
||||
|
||||
|
||||
# testing a helper function
|
||||
def test_remove_capitalization_of_dict_keys():
|
||||
result = remove_capitalization_of_dict_keys(
|
||||
{
|
||||
"Id": res1["pipelineId"],
|
||||
"Name": "mypipeline1",
|
||||
},
|
||||
{
|
||||
"Id": res2["pipelineId"],
|
||||
"Name": "mypipeline2"
|
||||
"Id": "IdValue",
|
||||
"Fields": [{
|
||||
"Key": "KeyValue",
|
||||
"StringValue": "StringValueValue"
|
||||
}]
|
||||
}
|
||||
])
|
||||
)
|
||||
|
||||
result.should.equal({
|
||||
"id": "IdValue",
|
||||
"fields": [{
|
||||
"key": "KeyValue",
|
||||
"stringValue": "StringValueValue"
|
||||
}],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue