Sha256: fce7b6e32f5e80436794f1800d006590bf80781155193754a9e30c50ce0f7ea4

Contents?: true

Size: 1.46 KB

Versions: 4

Compression:

Stored size: 1.46 KB

Contents

from tests.unit import unittest

from boto.ses.connection import SESConnection
from boto.ses import exceptions


class SESConnectionTest(unittest.TestCase):
    ses = True

    def setUp(self):
        self.ses = SESConnection()

    def test_get_dkim_attributes(self):
        response = self.ses.get_identity_dkim_attributes(['example.com'])
        # Verify we get the structure we expect, we don't care about the
        # values.
        self.assertTrue('GetIdentityDkimAttributesResponse' in response)
        self.assertTrue('GetIdentityDkimAttributesResult' in
                        response['GetIdentityDkimAttributesResponse'])
        self.assertTrue(
            'DkimAttributes' in response['GetIdentityDkimAttributesResponse']\
                                        ['GetIdentityDkimAttributesResult'])

    def test_set_identity_dkim_enabled(self):
        # This api call should fail because have not verified the domain,
        # so we can test that it at least fails we we expect.
        with self.assertRaises(exceptions.SESIdentityNotVerifiedError):
            self.ses.set_identity_dkim_enabled('example.com', True)

    def test_verify_domain_dkim(self):
        # This api call should fail because have not confirmed the domain,
        # so we can test that it at least fails we we expect.
        with self.assertRaises(exceptions.SESDomainNotConfirmedError):
            self.ses.verify_domain_dkim('example.com')


if __name__ == '__main__':
    unittest.main()

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
googlecloud-0.0.7 packages/gsutil/boto/tests/integration/ses/test_connection.py
gcloud-0.0.7 packages/gsutil/boto/tests/integration/ses/test_connection.py
googlecloud-0.0.6 packages/gsutil/boto/tests/integration/ses/test_connection.py
gcloud-0.0.6 packages/gsutil/boto/tests/integration/ses/test_connection.py