Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
aws
GitHub Repository: aws/aws-cli
Path: blob/develop/tests/functional/cognito_identity/test_create_identity_pool.py
1567 views
1
# Copyright 2015 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
from awscli.testutils import BaseAWSCommandParamsTest
14
15
16
class TestCreateIdentityPool(BaseAWSCommandParamsTest):
17
18
PREFIX = 'cognito-identity create-identity-pool'
19
20
def test_accepts_old_argname(self):
21
cmdline = (
22
self.PREFIX + ' --identity-pool-name foo '
23
'--allow-unauthenticated-identities ' +
24
'--open-id-connect-provider-ar-ns aaaabbbbccccddddeeee'
25
)
26
params = {
27
'AllowUnauthenticatedIdentities': True,
28
'IdentityPoolName': 'foo',
29
'OpenIdConnectProviderARNs': ['aaaabbbbccccddddeeee']
30
}
31
self.assert_params_for_cmd(cmdline, params)
32
33
def test_accepts_fixed_param_name(self):
34
cmdline = (
35
self.PREFIX + ' --identity-pool-name foo '
36
'--allow-unauthenticated-identities ' +
37
'--open-id-connect-provider-arns aaaabbbbccccddddeeee'
38
)
39
params = {
40
'AllowUnauthenticatedIdentities': True,
41
'IdentityPoolName': 'foo',
42
'OpenIdConnectProviderARNs': ['aaaabbbbccccddddeeee']
43
}
44
self.assert_params_for_cmd(cmdline, params)
45
46