Cleaned up unused method and import

This commit is contained in:
Barry Ruffner 2018-04-03 11:58:11 -07:00
parent 83f4419d03
commit 433997629f
2 changed files with 1 additions and 17 deletions

View File

@ -6,7 +6,7 @@ import boto.cognito.identity
from moto.compat import OrderedDict
from moto.core import BaseBackend, BaseModel
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):

View File

@ -5,19 +5,3 @@ from moto.core.utils import get_random_hex
def get_random_identity_id(region):
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