Beispiel #1
0
def test_should_use_correct_enpdoint_url_in_boto(endpoint_url, expected):
    local_aws_ses_client = AwsSesClient()
    local_aws_ses_client.init_app(config.Test.AWS_REGION,
                                  None,
                                  None,
                                  endpoint_url=endpoint_url)
    assert local_aws_ses_client._client._endpoint.host == expected
Beispiel #2
0
def test_send_email_does_not_use_configuration_set_if_none(mocker):
    local_aws_ses_client = AwsSesClient()
    local_aws_ses_client.init_app(config.Test.AWS_REGION,
                                  mocker.Mock(),
                                  mocker.Mock(),
                                  configuration_set=None)
    boto_mock = mocker.patch.object(local_aws_ses_client,
                                    '_client',
                                    create=True)

    local_aws_ses_client.send_email(FROM_ADDRESS_COM,
                                    to_addresses=FOO_BAR_COM,
                                    subject='Subject',
                                    body='Body')

    assert 'ConfigurationSetName' not in boto_mock.send_raw_email.call_args[1]