ses: SetIdentityFeedbackForwardingEnabled and SetIdentityNotificationTopic #2130

merged 2 commits into from Mar 10, 2014


None yet
3 participants

nhumphreys commented Feb 27, 2014

Issue #2128


toastdriven commented Feb 27, 2014

Before this can be merged, it will need some unit tests. Something like (with appropriate bodies/assertions for the additions) would be perfect. Otherwise, it will need to wait until a core dev can add them.


nhumphreys commented Feb 27, 2014

Added some unit tests, hopefully they are what is required.
These two set methods return boring results as per the AWS API


danielgtaylor commented Feb 27, 2014

This looks great and the tests are passing, however before merging this in I'd love to see you add a request assertion test similar to

class TestPurchaseReservedInstanceOffering(TestEC2ConnectionBase):
    def default_body(self):
        return """<PurchaseReservedInstancesOffering />"""

    def test_serialized_api_args(self):
        response = self.ec2.purchase_reserved_instance_offering(
                'offering_id', 1, (100.0, 'USD'))
            'Action': 'PurchaseReservedInstancesOffering',
            'InstanceCount': 1,
            'ReservedInstancesOfferingId': 'offering_id',
            'LimitPrice.Amount': '100.0',
            'LimitPrice.CurrencyCode': 'USD',},
             ignore_params_values=['AWSAccessKeyId', 'SignatureMethod',
                                   'SignatureVersion', 'Timestamp',

If you can't get it working let me know and I'll take a stab at it. Thanks!

@danielgtaylor danielgtaylor self-assigned this Feb 27, 2014


nhumphreys commented Feb 28, 2014

Hi, With my limited experience I've given adding a request assertion a go, I'm guessing I haven't properly init something further up. Or maybe I'm just doing it wrong :(

Here is the I made for ses

#!/usr/bin/env python

from tests.unit import unittest
from tests.unit import AWSMockServiceTestCase

from boto.jsonresponse import ListElement
from import SESConnection

class TestSESConnectionBase(AWSMockServiceTestCase):
    connection_class = SESConnection

    def setUp(self):
        super(TestSESConnectionBase, self).setUp() = self.service_connection

class TestSESSetIdentityNotificationTopicResponse(TestSESConnectionBase):
    def default_body(self):
        return """<SetIdentityNotificationTopic />"""

    def test_serialized_api_args(self):
        response =
           'Action': 'SetIdentityNotificationTopic',
           'Identity': '',
           'NotificationType': 'Bounce',
           'SnsTopic': 'arn:aws:sns:us-east-1:123456789012:example',},
           ignore_params_values=['AWSAccessKeyId', 'SignatureMethod',
                                   'SignatureVersion', 'Timestamp',

if __name__ == '__main__':


    self.assertIn(param, request_params)
AssertionError: 'AWSAccessKeyId' not found in {}

It would be great if you could have a stab at it.


danielgtaylor commented Mar 10, 2014

@nhumphreys sorry I made a mistake in the type of service this is - you can't use assert_request_parameters like I was showing you. Very sorry for the confusion I must have caused. This looks good as-is and I'm going to merge it in. Later we can add more tests if needed, but the response handling tests look like they cover most of the new code.

danielgtaylor added a commit that referenced this pull request Mar 10, 2014

Merge pull request #2130 from nhumphreys/ses-notification-support
Add SetIdentityFeedbackForwardingEnabled and SetIdentityNotificationTopic for SES. Fixes #2130, #2128.

@danielgtaylor danielgtaylor merged commit 83002d5 into boto:develop Mar 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment