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

Side by Side Diff: third_party/gsutil/boto/tests/integration/ses/test_connection.py

Issue 12317103: Added gsutil to depot tools (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: added readme Created 7 years, 9 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 from tests.unit import unittest
2
3 from boto.ses.connection import SESConnection
4 from boto.ses import exceptions
5
6
7 class SESConnectionTest(unittest.TestCase):
8 ses = True
9
10 def setUp(self):
11 self.ses = SESConnection()
12
13 def test_get_dkim_attributes(self):
14 response = self.ses.get_identity_dkim_attributes(['example.com'])
15 # Verify we get the structure we expect, we don't care about the
16 # values.
17 self.assertTrue('GetIdentityDkimAttributesResponse' in response)
18 self.assertTrue('GetIdentityDkimAttributesResult' in
19 response['GetIdentityDkimAttributesResponse'])
20 self.assertTrue(
21 'DkimAttributes' in response['GetIdentityDkimAttributesResponse']\
22 ['GetIdentityDkimAttributesResult'])
23
24 def test_set_identity_dkim_enabled(self):
25 # This api call should fail because have not verified the domain,
26 # so we can test that it at least fails we we expect.
27 with self.assertRaises(exceptions.SESIdentityNotVerifiedError):
28 self.ses.set_identity_dkim_enabled('example.com', True)
29
30 def test_verify_domain_dkim(self):
31 # This api call should fail because have not confirmed the domain,
32 # so we can test that it at least fails we we expect.
33 with self.assertRaises(exceptions.SESDomainNotConfirmedError):
34 self.ses.verify_domain_dkim('example.com')
35
36
37 if __name__ == '__main__':
38 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698