| Index: third_party/boto/tests/unit/ses/test_identity.py
|
| ===================================================================
|
| --- third_party/boto/tests/unit/ses/test_identity.py (revision 33376)
|
| +++ third_party/boto/tests/unit/ses/test_identity.py (working copy)
|
| @@ -78,5 +78,94 @@
|
| tokens[2])
|
|
|
|
|
| +class TestSESSetIdentityNotificationTopic(AWSMockServiceTestCase):
|
| + connection_class = SESConnection
|
| +
|
| + def setUp(self):
|
| + super(TestSESSetIdentityNotificationTopic, self).setUp()
|
| +
|
| + def default_body(self):
|
| + return """<SetIdentityNotificationTopicResponse \
|
| + xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
|
| + <SetIdentityNotificationTopicResult/>
|
| + <ResponseMetadata>
|
| + <RequestId>299f4af4-b72a-11e1-901f-1fbd90e8104f</RequestId>
|
| + </ResponseMetadata>
|
| + </SetIdentityNotificationTopicResponse>"""
|
| +
|
| + def test_ses_set_identity_notification_topic_bounce(self):
|
| + self.set_http_response(status_code=200)
|
| +
|
| + response = self.service_connection\
|
| + .set_identity_notification_topic(
|
| + identity='user@example.com',
|
| + notification_type='Bounce',
|
| + sns_topic='arn:aws:sns:us-east-1:123456789012:example')
|
| +
|
| + response = response['SetIdentityNotificationTopicResponse']
|
| + result = response['SetIdentityNotificationTopicResult']
|
| +
|
| + self.assertEqual(2, len(response))
|
| + self.assertEqual(0, len(result))
|
| +
|
| + def test_ses_set_identity_notification_topic_complaint(self):
|
| + self.set_http_response(status_code=200)
|
| +
|
| + response = self.service_connection\
|
| + .set_identity_notification_topic(
|
| + identity='user@example.com',
|
| + notification_type='Complaint',
|
| + sns_topic='arn:aws:sns:us-east-1:123456789012:example')
|
| +
|
| + response = response['SetIdentityNotificationTopicResponse']
|
| + result = response['SetIdentityNotificationTopicResult']
|
| +
|
| + self.assertEqual(2, len(response))
|
| + self.assertEqual(0, len(result))
|
| +
|
| +class TestSESSetIdentityFeedbackForwardingEnabled(AWSMockServiceTestCase):
|
| + connection_class = SESConnection
|
| +
|
| + def setUp(self):
|
| + super(TestSESSetIdentityFeedbackForwardingEnabled, self).setUp()
|
| +
|
| + def default_body(self):
|
| + return """<SetIdentityFeedbackForwardingEnabledResponse \
|
| + xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
|
| + <SetIdentityFeedbackForwardingEnabledResult/>
|
| + <ResponseMetadata>
|
| + <RequestId>299f4af4-b72a-11e1-901f-1fbd90e8104f</RequestId>
|
| + </ResponseMetadata>
|
| + </SetIdentityFeedbackForwardingEnabledResponse>"""
|
| +
|
| + def test_ses_set_identity_feedback_forwarding_enabled_true(self):
|
| + self.set_http_response(status_code=200)
|
| +
|
| + response = self.service_connection\
|
| + .set_identity_feedback_forwarding_enabled(
|
| + identity='user@example.com',
|
| + forwarding_enabled=True)
|
| +
|
| + response = response['SetIdentityFeedbackForwardingEnabledResponse']
|
| + result = response['SetIdentityFeedbackForwardingEnabledResult']
|
| +
|
| + self.assertEqual(2, len(response))
|
| + self.assertEqual(0, len(result))
|
| +
|
| + def test_ses_set_identity_notification_topic_enabled_false(self):
|
| + self.set_http_response(status_code=200)
|
| +
|
| + response = self.service_connection\
|
| + .set_identity_feedback_forwarding_enabled(
|
| + identity='user@example.com',
|
| + forwarding_enabled=False)
|
| +
|
| + response = response['SetIdentityFeedbackForwardingEnabledResponse']
|
| + result = response['SetIdentityFeedbackForwardingEnabledResult']
|
| +
|
| + self.assertEqual(2, len(response))
|
| + self.assertEqual(0, len(result))
|
| +
|
| +
|
| if __name__ == '__main__':
|
| unittest.main()
|
|
|