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

@@ -855,6 +855,7 @@ def mock_firetext_client(mocker, statsd_client=None):
client = FiretextClient()
statsd_client = statsd_client or mocker.Mock()
current_app = mocker.Mock(config={
'FIRETEXT_URL': 'https://example.com/firetext',
'FIRETEXT_API_KEY': 'foo',
'FROM_NUMBER': 'bar'
})