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:
Alexey Bezhan
2019-04-12 12:03:58 +01:00
parent 09decfe3a8
commit 330afab5e2
5 changed files with 24 additions and 18 deletions

View File

@@ -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):