From 433997629fd59cc0b3996eacecb538035a475e60 Mon Sep 17 00:00:00 2001 From: Barry Ruffner Date: Tue, 3 Apr 2018 11:58:11 -0700 Subject: [PATCH] Cleaned up unused method and import --- moto/cognitoidentity/models.py | 2 +- moto/cognitoidentity/utils.py | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/moto/cognitoidentity/models.py b/moto/cognitoidentity/models.py index 95663de53..d0ec2d735 100644 --- a/moto/cognitoidentity/models.py +++ b/moto/cognitoidentity/models.py @@ -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): diff --git a/moto/cognitoidentity/utils.py b/moto/cognitoidentity/utils.py index 4832c2042..d885e0e81 100644 --- a/moto/cognitoidentity/utils.py +++ b/moto/cognitoidentity/utils.py @@ -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