@mock_sns
def test_get_list_endpoints_by_platform_application():
    conn = boto.connect_sns()
    platform_application = conn.create_platform_application(name='my-application', platform='APNS')
    application_arn = platform_application['CreatePlatformApplicationResponse']['CreatePlatformApplicationResult']['PlatformApplicationArn']
    endpoint = conn.create_platform_endpoint(platform_application_arn=application_arn, token='some_unique_id', custom_user_data='some user data', attributes={'CustomUserData': 'some data'})
    endpoint_arn = endpoint['CreatePlatformEndpointResponse']['CreatePlatformEndpointResult']['EndpointArn']
    endpoint_list = conn.list_endpoints_by_platform_application(platform_application_arn=application_arn)['ListEndpointsByPlatformApplicationResponse']['ListEndpointsByPlatformApplicationResult']['Endpoints']
    endpoint_list.should.have.length_of(1)
    endpoint_list[0]['Attributes']['CustomUserData'].should.equal('some data')
    endpoint_list[0]['EndpointArn'].should.equal(endpoint_arn)
@mock_sns
def test_get_list_endpoints_by_platform_application():
    conn = boto.connect_sns()
    platform_application = conn.create_platform_application(name='my-application', platform='APNS')
    application_arn = platform_application['CreatePlatformApplicationResponse']['CreatePlatformApplicationResult']['PlatformApplicationArn']
    endpoint = conn.create_platform_endpoint(platform_application_arn=application_arn, token='some_unique_id', custom_user_data='some user data', attributes={'CustomUserData': 'some data'})
    endpoint_arn = endpoint['CreatePlatformEndpointResponse']['CreatePlatformEndpointResult']['EndpointArn']
    endpoint_list = conn.list_endpoints_by_platform_application(platform_application_arn=application_arn)['ListEndpointsByPlatformApplicationResponse']['ListEndpointsByPlatformApplicationResult']['Endpoints']
    endpoint_list.should.have.length_of(1)
    endpoint_list[0]['Attributes']['CustomUserData'].should.equal('some data')
    endpoint_list[0]['EndpointArn'].should.equal(endpoint_arn)