Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/tests/unit/customizations/datapipeline/test_arg_parse.py
1569 views
1
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2
#
3
# Licensed under the Apache License, Version 2.0 (the "License"). You
4
# may not use this file except in compliance with the License. A copy of
5
# the License is located at
6
#
7
# http://aws.amazon.com/apache2.0/
8
#
9
# or in the "license" file accompanying this file. This file is
10
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
11
# ANY KIND, either express or implied. See the License for the specific
12
# language governing permissions and limitations under the License.
13
14
from awscli.testutils import unittest
15
16
from awscli.customizations.datapipeline import ParameterValuesInlineArgument
17
18
19
class TestParameterValuesInlineArgument(unittest.TestCase):
20
21
def test_over_2_values_with_same_key(self):
22
parameters = {}
23
argument = ParameterValuesInlineArgument('parameter-values')
24
argument.add_to_params(
25
parameters,
26
[
27
'param1=value1',
28
'param1=value2',
29
'param1=value3',
30
]
31
)
32
self.assertEqual(
33
parameters['parameterValues'],
34
[
35
{
36
"id": "param1",
37
"stringValue": "value1"
38
},
39
{
40
"id": "param1",
41
"stringValue": "value2"
42
},
43
{
44
"id": "param1",
45
"stringValue": "value3"
46
}
47
]
48
)
49
50