Cleaned up unused method and import
This commit is contained in:
parent
83f4419d03
commit
433997629f
@ -6,7 +6,7 @@ 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, remove_capitalization_of_dict_keys
|
from .utils import get_random_identity_id
|
||||||
|
|
||||||
|
|
||||||
class CognitoIdentityObject(BaseModel):
|
class CognitoIdentityObject(BaseModel):
|
||||||
|
@ -5,19 +5,3 @@ from moto.core.utils import get_random_hex
|
|||||||
|
|
||||||
def get_random_identity_id(region):
|
def get_random_identity_id(region):
|
||||||
return "{0}:{0}".format(region, get_random_hex(length=19))
|
return "{0}:{0}".format(region, get_random_hex(length=19))
|
||||||
|
|
||||||
|
|
||||||
def remove_capitalization_of_dict_keys(obj):
|
|
||||||
if isinstance(obj, collections.Mapping):
|
|
||||||
result = obj.__class__()
|
|
||||||
for key, value in obj.items():
|
|
||||||
normalized_key = key[:1].lower() + key[1:]
|
|
||||||
result[normalized_key] = remove_capitalization_of_dict_keys(value)
|
|
||||||
return result
|
|
||||||
elif isinstance(obj, collections.Iterable) and not isinstance(obj, six.string_types):
|
|
||||||
result = obj.__class__()
|
|
||||||
for item in obj:
|
|
||||||
result += (remove_capitalization_of_dict_keys(item),)
|
|
||||||
return result
|
|
||||||
else:
|
|
||||||
return obj
|
|
||||||
|
Loading…
Reference in New Issue
Block a user