More cleanup of identation and reordering / newlines for flake8 happiness.
This commit is contained in:
parent
5df0f1befc
commit
ed495cdd9e
@ -1,11 +1,14 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import json
|
|
||||||
import datetime
|
import datetime
|
||||||
|
import json
|
||||||
|
|
||||||
import boto.cognito.identity
|
import boto.cognito.identity
|
||||||
|
|
||||||
from moto.compat import OrderedDict
|
from moto.compat import OrderedDict
|
||||||
from moto.core import BaseBackend, BaseModel
|
from moto.core import BaseBackend, BaseModel
|
||||||
from moto.core.utils import iso_8601_datetime_with_milliseconds
|
from moto.core.utils import iso_8601_datetime_with_milliseconds
|
||||||
|
|
||||||
from .utils import get_random_identity_id
|
from .utils import get_random_identity_id
|
||||||
|
|
||||||
|
|
||||||
@ -86,8 +89,10 @@ class CognitoIdentityBackend(BaseBackend):
|
|||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
expiration = now + datetime.timedelta(seconds=duration)
|
expiration = now + datetime.timedelta(seconds=duration)
|
||||||
expiration_str = str(iso_8601_datetime_with_milliseconds(expiration))
|
expiration_str = str(iso_8601_datetime_with_milliseconds(expiration))
|
||||||
return json.dumps({
|
return json.dumps(
|
||||||
"Credentials": {
|
{
|
||||||
|
"Credentials":
|
||||||
|
{
|
||||||
"AccessKeyId": "TESTACCESSKEY12345",
|
"AccessKeyId": "TESTACCESSKEY12345",
|
||||||
"Expiration": expiration_str,
|
"Expiration": expiration_str,
|
||||||
"SecretKey": "ABCSECRETKEY",
|
"SecretKey": "ABCSECRETKEY",
|
||||||
@ -101,8 +106,10 @@ class CognitoIdentityBackend(BaseBackend):
|
|||||||
now = datetime.datetime.utcnow()
|
now = datetime.datetime.utcnow()
|
||||||
expiration = now + datetime.timedelta(seconds=duration)
|
expiration = now + datetime.timedelta(seconds=duration)
|
||||||
expiration_str = str(iso_8601_datetime_with_milliseconds(expiration))
|
expiration_str = str(iso_8601_datetime_with_milliseconds(expiration))
|
||||||
return json.dumps({
|
return json.dumps(
|
||||||
"Credentials": {
|
{
|
||||||
|
"Credentials":
|
||||||
|
{
|
||||||
"AccessKeyId": "TESTACCESSKEY12345",
|
"AccessKeyId": "TESTACCESSKEY12345",
|
||||||
"Expiration": expiration_str,
|
"Expiration": expiration_str,
|
||||||
"SecretKey": "ABCSECRETKEY",
|
"SecretKey": "ABCSECRETKEY",
|
||||||
|
@ -3,6 +3,7 @@ from __future__ import unicode_literals
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
from moto.core.responses import BaseResponse
|
from moto.core.responses import BaseResponse
|
||||||
|
|
||||||
from .models import cognitoidentity_backends
|
from .models import cognitoidentity_backends
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user