From 816e6ad818dd11cf51c61f17e855c1727e5e1ff1 Mon Sep 17 00:00:00 2001 From: Kenneth Kehl <@kkehl@flexion.us> Date: Thu, 2 Oct 2025 11:56:20 -0700 Subject: [PATCH] fix tests --- app/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/__init__.py b/app/__init__.py index 05d86f698..18dbceb7a 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -126,6 +126,15 @@ def get_zendesk_client(): return zendesk_client +def get_aws_ses_client(): + global aws_ses_client + if os.environ.get("NOTIFY_ENVIRONMENT") == "test": + return AwsSesClient() + if aws_ses_client is None: + raise RuntimeError(f"Celery not initialized aws_ses_client: {aws_ses_client}") + return aws_ses_client + + def get_document_download_client(): global document_download_client # Our unit tests mock anyway