"""Generate fake sns.get_endpoint_attributes() responses.""" def generate_attributes(custom_user_data=None, enabled='false'): """Generate fake response to get_endpoint_attributes(). Args: custom_user_data (str): custom data in any format enabled (str): string representation of boolean as endpoint status Returns: object: fake SNS endpoint attributes object """ attributes = { 'Attributes': { 'Enabled': enabled, 'Token': '', }, 'ResponseMetadata': { 'RequestId': '', 'HTTPStatusCode': 200, 'HTTPHeaders': { 'x-amzn-requestid': '', 'content-type': 'text/xml', 'content-length': '', 'date': '' }, 'RetryAttempts': 0 } } if custom_user_data: attributes['Attributes']['CustomUserData'] = custom_user_data return attributes