Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Unified Diff: third_party/boto/tests/unit/ses/test_identity.py

Issue 698893003: Update checked in version of gsutil to version 4.6 (Closed) Base URL: http://dart.googlecode.com/svn/third_party/gsutil/
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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()
« no previous file with comments | « third_party/boto/tests/unit/s3/test_connection.py ('k') | third_party/boto/tests/unit/sns/test_connection.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698