Stub SES email client to avoid hitting SES during load testing

If we set an environment variable, we can stub out calls to SES and send
them to our own stub app. If the environment variable is not set, things
work as normal.

To be used alongside
https://github.com/alphagov/notifications-email-provider-stub
This commit is contained in:
Pea Tyczynska
2020-06-01 17:08:30 +01:00
parent db040c40b9
commit 6422a88c8c
3 changed files with 62 additions and 1 deletions

View File

@@ -345,6 +345,7 @@ class Config(object):
# these environment vars aren't defined in the manifest so to set them on paas use `cf set-env`
MMG_URL = os.environ.get("MMG_URL", "https://api.mmg.co.uk/jsonv2a/api.php")
FIRETEXT_URL = os.environ.get("FIRETEXT_URL", "https://www.firetext.co.uk/api/sendsms/json")
SES_STUB_URL = os.environ.get("SES_STUB_URL")
AWS_REGION = 'eu-west-1'