Added a print.
This commit is contained in:
parent
1046ee5041
commit
2455de8282
@ -1,26 +1,20 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import base64
|
|
||||||
import botocore.client
|
|
||||||
import boto3
|
import boto3
|
||||||
import hashlib
|
|
||||||
import io
|
from moto import mock_cognitoidentity
|
||||||
import json
|
|
||||||
import zipfile
|
|
||||||
import sure # noqa
|
import sure # noqa
|
||||||
|
|
||||||
from freezegun import freeze_time
|
|
||||||
from moto import mock_cognitoidentity, settings
|
|
||||||
|
|
||||||
@mock_cognitoidentity
|
@mock_cognitoidentity
|
||||||
def test_create_identity_pool():
|
def test_create_identity_pool():
|
||||||
conn = boto3.client('cognito-identity', 'us-west-2')
|
conn = boto3.client('cognito-identity', 'us-west-2')
|
||||||
|
|
||||||
result = conn.create_identity_pool(IdentityPoolName='TestPool',
|
result = conn.create_identity_pool(IdentityPoolName='TestPool',
|
||||||
AllowUnauthenticatedIdentities=False,
|
AllowUnauthenticatedIdentities=False,
|
||||||
SupportedLoginProviders={'graph.facebook.com':'123456789012345'},
|
SupportedLoginProviders={'graph.facebook.com': '123456789012345'},
|
||||||
DeveloperProviderName='devname',
|
DeveloperProviderName='devname',
|
||||||
OpenIdConnectProviderARNs=['arn:aws:rds:eu-west-2:123456789012:db:mysql-db',],
|
OpenIdConnectProviderARNs=['arn:aws:rds:eu-west-2:123456789012:db:mysql-db'],
|
||||||
CognitoIdentityProviders=[
|
CognitoIdentityProviders=[
|
||||||
{
|
{
|
||||||
'ProviderName': 'testprovider',
|
'ProviderName': 'testprovider',
|
||||||
@ -28,25 +22,29 @@ def test_create_identity_pool():
|
|||||||
'ServerSideTokenCheck': True
|
'ServerSideTokenCheck': True
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
SamlProviderARNs=['arn:aws:rds:eu-west-2:123456789012:db:mysql-db',])
|
SamlProviderARNs=['arn:aws:rds:eu-west-2:123456789012:db:mysql-db'])
|
||||||
assert result['IdentityPoolId'] != ''
|
assert result['IdentityPoolId'] != ''
|
||||||
|
|
||||||
|
|
||||||
@mock_cognitoidentity
|
@mock_cognitoidentity
|
||||||
def test_get_id():
|
def test_get_id():
|
||||||
conn = boto3.client('cognito-identity', 'us-west-2')
|
conn = boto3.client('cognito-identity', 'us-west-2')
|
||||||
result = conn.get_id(AccountId='someaccount',
|
result = conn.get_id(AccountId='someaccount',
|
||||||
IdentityPoolId='us-west-2:12345',
|
IdentityPoolId='us-west-2:12345',
|
||||||
Logins={
|
Logins={
|
||||||
'someurl': '12345'
|
'someurl': '12345'
|
||||||
})
|
})
|
||||||
|
print(result)
|
||||||
assert result['IdentityId'].startswith('us-west-2')
|
assert result['IdentityId'].startswith('us-west-2')
|
||||||
|
|
||||||
|
|
||||||
@mock_cognitoidentity
|
@mock_cognitoidentity
|
||||||
def test_get_credentials_for_identity():
|
def test_get_credentials_for_identity():
|
||||||
conn = boto3.client('cognito-identity', 'us-west-2')
|
conn = boto3.client('cognito-identity', 'us-west-2')
|
||||||
result = conn.get_credentials_for_identity(IdentityId='12345')
|
result = conn.get_credentials_for_identity(IdentityId='12345')
|
||||||
assert result['IdentityId'] == '12345'
|
assert result['IdentityId'] == '12345'
|
||||||
|
|
||||||
|
|
||||||
@mock_cognitoidentity
|
@mock_cognitoidentity
|
||||||
def test_get_open_id_token_for_developer_identity():
|
def test_get_open_id_token_for_developer_identity():
|
||||||
conn = boto3.client('cognito-identity', 'us-west-2')
|
conn = boto3.client('cognito-identity', 'us-west-2')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user