diff --git a/moto/cognitoidp/models.py b/moto/cognitoidp/models.py index 810077faf..2f2f7e870 100644 --- a/moto/cognitoidp/models.py +++ b/moto/cognitoidp/models.py @@ -564,7 +564,9 @@ class CognitoIdpBackend(BaseBackend): user.groups.discard(group) # User - def admin_create_user(self, user_pool_id, username, message_action, temporary_password, attributes): + def admin_create_user( + self, user_pool_id, username, message_action, temporary_password, attributes + ): user_pool = self.user_pools.get(user_pool_id) if not user_pool: raise ResourceNotFoundError(user_pool_id)