Merge pull request #2311 from caguado/fix/2310

Implement get_open_id_token
This commit is contained in:
Steve Pulec 2019-07-20 00:12:18 -04:00 committed by GitHub
commit 5c34c06d07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 69 additions and 19 deletions

View file

@ -68,7 +68,7 @@ def test_get_open_id_token_for_developer_identity():
},
TokenDuration=123
)
assert len(result['Token'])
assert len(result['Token']) > 0
assert result['IdentityId'] == '12345'
@mock_cognitoidentity
@ -83,3 +83,15 @@ def test_get_open_id_token_for_developer_identity_when_no_explicit_identity_id()
)
assert len(result['Token']) > 0
assert len(result['IdentityId']) > 0
@mock_cognitoidentity
def test_get_open_id_token():
conn = boto3.client('cognito-identity', 'us-west-2')
result = conn.get_open_id_token(
IdentityId='12345',
Logins={
'someurl': '12345'
}
)
assert len(result['Token']) > 0
assert result['IdentityId'] == '12345'