"""Test aws ses utils.""" from moto import mock_aws from unittest.mock import patch from vector_utils.aws_utils import ses @mock_aws @patch('vector_utils.aws_utils.ses.boto3.client') def test_send_email(mock_aws_client): """Test Email.send.""" test_attachment = { 'data': str.encode('this is the attachment'), 'file_name': 'test_file.txt', 'mime_type': 'plain/text' } response = ses.Email(mock_aws_client).send( 'This is a test', 'from@test.com', ['to1@test.com', 'to2@test.com'], 'test body', test_attachment) assert response['MessageId'] is not None