def mock_firetext_client(mocker, statsd_client=None): client = FiretextClient() statsd_client = statsd_client or mocker.Mock() current_app = mocker.Mock(config={ 'FIRETEXT_API_KEY': 'foo', 'FROM_NUMBER': 'bar' }) client.init_app(current_app, statsd_client) return client
def mock_firetext_client(mocker): client = FiretextClient() statsd_client = mocker.Mock() current_app = mocker.Mock(config={ 'FIRETEXT_URL': 'https://example.com/firetext', 'FIRETEXT_API_KEY': 'foo', 'FROM_NUMBER': 'bar' }) client.init_app(current_app, statsd_client) return client