9 fail, 131 skipped, 2 712 pass in 59m 55s
2 files 2 suites 59m 55s ⏱️
2 852 tests 2 712 ✅ 131 💤 9 ❌
2 854 runs 2 712 ✅ 133 💤 9 ❌
Results for commit 847e34d.
Annotations
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[True-Bounce] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a1406150>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f81abcf6160>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81abacd6d0>
notification_type = 'Bounce', enabled = True
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': True, 'Identity': '[email protected]', 'NotificationType': 'Bounce'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[True-Complaint] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a1405f50>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f81abcf6fc0>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81ab87d610>
notification_type = 'Complaint', enabled = True
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': True, 'Identity': '[email protected]', 'NotificationType': 'Complaint'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[True-Delivery] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a2993f20>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f819f4bef20>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81ab1adb50>
notification_type = 'Delivery', enabled = True
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': True, 'Identity': '[email protected]', 'NotificationType': 'Delivery'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[False-Bounce] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a299c140>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f8267093c40>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81ab957050>
notification_type = 'Bounce', enabled = False
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': False, 'Identity': '[email protected]', 'NotificationType': 'Bounce'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[False-Complaint] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a29e2cf0>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f81ab9439c0>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81ab9574d0>
notification_type = 'Complaint', enabled = False
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': False, 'Identity': '[email protected]', 'NotificationType': 'Complaint'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_success[False-Delivery] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
handler(self, self.context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
handler(chain, context, response)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
skeleton_response = self.skeleton.invoke(context)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
return self.dispatch_request(serializer, context, instance)
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
result = handler(context, instance) or {}
~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
return handler(context, req)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
return self.fn(*args, **kwargs)
~~~~~~~^^^^^^^^^^^^^^^^^
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
return fn(*args, **kwargs)
File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
if identity not in backend.addresses:
^^^^^^^^^^^^^^^^^
AttributeError: 'SESBackend' object has no attribute 'addresses'
self = <tests.aws.services.ses.test_ses.TestSES object at 0x7f82a21ff5b0>
aws_client = <localstack.aws.connect.ServiceLevelClientFactory object at 0x7f82962b7a10>
setup_email_addresses = <function setup_email_addresses.<locals>.inner at 0x7f81abcf4d60>
snapshot = <localstack_snapshot.snapshots.prototype.SnapshotSession object at 0x7f81abb93710>
notification_type = 'Delivery', enabled = False
@markers.aws.validated
@pytest.mark.parametrize("notification_type", ["Bounce", "Complaint", "Delivery"])
@pytest.mark.parametrize("enabled", [True, False])
def test_set_identity_headers_in_notifications_enabled_success(
self, aws_client, setup_email_addresses, snapshot, notification_type, enabled
):
"""
Test SetIdentityHeadersInNotificationsEnabled for valid identities and notification types.
Also checks idempotency.
"""
sender_email, _ = setup_email_addresses()
> response = aws_client.ses.set_identity_headers_in_notifications_enabled(
Identity=sender_email,
NotificationType=notification_type,
Enabled=enabled,
)
../../localstack/tests/aws/services/ses/test_ses.py:439:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../.venv/lib/python3.13/site-packages/botocore/client.py:602: in _api_call
return self._make_api_call(operation_name, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../.venv/lib/python3.13/site-packages/botocore/context.py:123: in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <botocore.client.SES object at 0x7f81b8c96660>
operation_name = 'SetIdentityHeadersInNotificationsEnabled'
api_params = {'Enabled': False, 'Identity': '[email protected]', 'NotificationType': 'Delivery'}
@with_current_context()
def _make_api_call(self, operation_name, api_params):
operation_model = self._service_model.operation_model(operation_name)
service_name = self._service_model.service_name
history_recorder.record(
'API_CALL',
{
'service': service_name,
'operation': operation_name,
'params': api_params,
},
)
if operation_model.deprecated:
logger.debug(
'Warning: %s.%s() is deprecated', service_name, operation_name
)
request_context = {
'client_region': self.meta.region_name,
'client_config': self.meta.config,
'has_streaming_input': operation_model.has_streaming_input,
'auth_type': operation_model.resolved_auth_type,
'unsigned_payload': operation_model.unsigned_payload,
'auth_options': self._service_model.metadata.get('auth'),
}
api_params = self._emit_api_params(
api_params=api_params,
operation_model=operation_model,
context=request_context,
)
(
endpoint_url,
additional_headers,
properties,
) = self._resolve_endpoint_ruleset(
operation_model, api_params, request_context
)
if properties:
# Pass arbitrary endpoint info with the Request
# for use during construction.
request_context['endpoint_properties'] = properties
request_dict = self._convert_to_request_dict(
api_params=api_params,
operation_model=operation_model,
endpoint_url=endpoint_url,
context=request_context,
headers=additional_headers,
)
resolve_checksum_context(request_dict, operation_model, api_params)
service_id = self._service_model.service_id.hyphenize()
handler, event_response = self.meta.events.emit_until_response(
f'before-call.{service_id}.{operation_name}',
model=operation_model,
params=request_dict,
request_signer=self._request_signer,
context=request_context,
)
if event_response is not None:
http, parsed_response = event_response
else:
maybe_compress_request(
self.meta.config, request_dict, operation_model
)
apply_request_checksum(request_dict)
http, parsed_response = self._make_request(
operation_model, request_dict, request_context
)
self.meta.events.emit(
f'after-call.{service_id}.{operation_name}',
http_response=http,
parsed=parsed_response,
model=operation_model,
context=request_context,
)
if http.status_code >= 300:
error_info = parsed_response.get("Error", {})
error_code = request_context.get(
'error_code_override'
) or error_info.get("Code")
error_class = self.exceptions.from_code(error_code)
> raise error_class(parsed_response, operation_name)
E botocore.exceptions.ClientError: An error occurred (InternalError) when calling the SetIdentityHeadersInNotificationsEnabled operation (reached max retries: 0): exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):
E File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle
E handler(self, self.context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__
E handler(chain, context, response)
E ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__
E skeleton_response = self.skeleton.invoke(context)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke
E return self.dispatch_request(serializer, context, instance)
E ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request
E result = handler(context, instance) or {}
E ~~~~~~~^^^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call
E return handler(context, req)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__
E return self.fn(*args, **kwargs)
E ~~~~~~~^^^^^^^^^^^^^^^^^
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker
E return fn(*args, **kwargs)
E File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled
E if identity not in backend.addresses:
E ^^^^^^^^^^^^^^^^^
E AttributeError: 'SESBackend' object has no attribute 'addresses'
../.venv/lib/python3.13/site-packages/botocore/client.py:1078: ClientError
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_failure_unknown_identity[Bounce] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
>> match key: set-headers-error-unknown-identity-bounce
#x1B[33m(~)#x1B[0m /Error/Code 'MessageRejected' → 'InternalError' ... (expected → actual)
#x1B[33m(~)#x1B[0m /ResponseMetadata/HTTPStatusCode 400 → 500 ... (expected → actual)
#x1B[33m(~)#x1B[0m /Error/Message 'Identity [email protected] is not verified or does not exist.' → 'exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):\n File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle\n handler(self, self.context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__\n handler(chain, context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__\n skeleton_response = self.skeleton.invoke(context)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke\n return self.dispatch_request(serializer, context, instance)\n ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request\n result = handler(context, instance) or {}\n ~~~~~~~^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call\n return handler(context, req)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__\n return self.fn(*args, **kwargs)\n ~~~~~~~^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker\n return fn(*args, **kwargs)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled\n if identity not in backend.addresses:\n ^^^^^^^^^^^^^^^^^\nAttributeError: \'SESBackend\' object has no attribute \'addresses\'\n' ... (expected → actual)
#x1B[31m(-)#x1B[0m /Error/Type ( 'Sender' )
Ignore list (please keep in mind list indices might not work and should be replaced):
["$..Error.Code", "$..Error.Message", "$..Error.Type", "$..ResponseMetadata.HTTPStatusCode"]
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_failure_unknown_identity[Complaint] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
>> match key: set-headers-error-unknown-identity-complaint
#x1B[33m(~)#x1B[0m /Error/Code 'MessageRejected' → 'InternalError' ... (expected → actual)
#x1B[33m(~)#x1B[0m /ResponseMetadata/HTTPStatusCode 400 → 500 ... (expected → actual)
#x1B[33m(~)#x1B[0m /Error/Message 'Identity [email protected] is not verified or does not exist.' → 'exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):\n File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle\n handler(self, self.context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__\n handler(chain, context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__\n skeleton_response = self.skeleton.invoke(context)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke\n return self.dispatch_request(serializer, context, instance)\n ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request\n result = handler(context, instance) or {}\n ~~~~~~~^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call\n return handler(context, req)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__\n return self.fn(*args, **kwargs)\n ~~~~~~~^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker\n return fn(*args, **kwargs)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled\n if identity not in backend.addresses:\n ^^^^^^^^^^^^^^^^^\nAttributeError: \'SESBackend\' object has no attribute \'addresses\'\n' ... (expected → actual)
#x1B[31m(-)#x1B[0m /Error/Type ( 'Sender' )
Ignore list (please keep in mind list indices might not work and should be replaced):
["$..Error.Code", "$..Error.Message", "$..Error.Type", "$..ResponseMetadata.HTTPStatusCode"]
Check warning on line 0 in tests.aws.services.ses.test_ses.TestSES
github-actions / LocalStack Community integration with Pro
test_set_identity_headers_in_notifications_enabled_failure_unknown_identity[Delivery] (tests.aws.services.ses.test_ses.TestSES) failed
pytest-junit-community-2.xml [took 0s]
Raw output
>> match key: set-headers-error-unknown-identity-delivery
#x1B[33m(~)#x1B[0m /Error/Code 'MessageRejected' → 'InternalError' ... (expected → actual)
#x1B[33m(~)#x1B[0m /ResponseMetadata/HTTPStatusCode 400 → 500 ... (expected → actual)
#x1B[33m(~)#x1B[0m /Error/Message 'Identity [email protected] is not verified or does not exist.' → 'exception while calling ses.SetIdentityHeadersInNotificationsEnabled: Traceback (most recent call last):\n File "/home/runner/work/localstack/localstack/localstack-pro/.venv/lib/python3.13/site-packages/rolo/gateway/chain.py", line 166, in handle\n handler(self, self.context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 116, in __call__\n handler(chain, context, response)\n ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/handlers/service.py", line 86, in __call__\n skeleton_response = self.skeleton.invoke(context)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 155, in invoke\n return self.dispatch_request(serializer, context, instance)\n ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 169, in dispatch_request\n result = handler(context, instance) or {}\n ~~~~~~~^^^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/forwarder.py", line 137, in _call\n return handler(context, req)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/skeleton.py", line 117, in __call__\n return self.fn(*args, **kwargs)\n ~~~~~~~^^^^^^^^^^^^^^^^^\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/aws/api/core.py", line 181, in operation_marker\n return fn(*args, **kwargs)\n File "/home/runner/work/localstack/localstack/localstack/localstack-core/localstack/services/ses/provider.py", line 562, in set_identity_headers_in_notifications_enabled\n if identity not in backend.addresses:\n ^^^^^^^^^^^^^^^^^\nAttributeError: \'SESBackend\' object has no attribute \'addresses\'\n' ... (expected → actual)
#x1B[31m(-)#x1B[0m /Error/Type ( 'Sender' )
Ignore list (please keep in mind list indices might not work and should be replaced):
["$..Error.Code", "$..Error.Message", "$..Error.Type", "$..ResponseMetadata.HTTPStatusCode"]