mirror of
https://github.com/GSA/notifications-api.git
synced 2026-01-31 23:26:23 -05:00
Make Firetext URL configurable through the application environment
Similar to MMG, there's a new env variable FIRETEXT_URL that can be used to override the Firetext api URL. This will be used to stub out both providers during the load test or can be used to run a local API against a fake provider endpoint.
This commit is contained in:
@@ -47,7 +47,7 @@ class FiretextClient(SmsClient):
|
||||
self.api_key = current_app.config.get('FIRETEXT_API_KEY')
|
||||
self.from_number = current_app.config.get('FROM_NUMBER')
|
||||
self.name = 'firetext'
|
||||
self.url = "https://www.firetext.co.uk/api/sendsms/json"
|
||||
self.url = current_app.config.get('FIRETEXT_URL')
|
||||
self.statsd_client = statsd_client
|
||||
|
||||
def get_name(self):
|
||||
|
||||
@@ -320,7 +320,9 @@ class Config(object):
|
||||
DOCUMENT_DOWNLOAD_API_HOST = os.environ.get('DOCUMENT_DOWNLOAD_API_HOST', 'http://localhost:7000')
|
||||
DOCUMENT_DOWNLOAD_API_KEY = os.environ.get('DOCUMENT_DOWNLOAD_API_KEY', 'auth-token')
|
||||
|
||||
MMG_URL = "https://api.mmg.co.uk/json/api.php"
|
||||
MMG_URL = os.environ.get("MMG_URL", "https://api.mmg.co.uk/json/api.php")
|
||||
FIRETEXT_URL = os.environ.get("FIRETEXT_URL", "https://www.firetext.co.uk/api/sendsms/json")
|
||||
|
||||
AWS_REGION = 'eu-west-1'
|
||||
|
||||
|
||||
@@ -402,6 +404,9 @@ class Test(Development):
|
||||
FIRETEXT_INBOUND_SMS_AUTH = ['testkey']
|
||||
TEMPLATE_PREVIEW_API_HOST = 'http://localhost:9999'
|
||||
|
||||
MMG_URL = 'https://example.com/mmg'
|
||||
FIRETEXT_URL = 'https://example.com/firetext'
|
||||
|
||||
|
||||
class Preview(Config):
|
||||
NOTIFY_EMAIL_DOMAIN = 'notify.works'
|
||||
|
||||
Reference in New Issue
Block a user