rename clients to notification_provider_clients

i think it's causing havoc with my attempts to mock stuff in the
`app.clients` directory because it's also accessible at that path. the
name's super vague and doesn't explain what it is anyway
This commit is contained in:
Leo Hemsted
2020-11-17 12:35:18 +00:00
parent 5924de9c14
commit 732c203d3e
5 changed files with 13 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ from werkzeug.exceptions import HTTPException as WerkzeugHTTPException
from werkzeug.local import LocalProxy
from app.celery.celery import NotifyCelery
from app.clients import Clients
from app.clients import NotificationProviderClients
from app.clients.cbc_proxy import CBCProxyClient, CBCProxyNoopClient
from app.clients.document_download import DocumentDownloadClient
from app.clients.email.aws_ses import AwsSesClient
@@ -65,7 +65,7 @@ cbc_proxy_client = CBCProxyNoopClient()
document_download_client = DocumentDownloadClient()
metrics = GDSMetrics()
clients = Clients()
notification_provider_clients = NotificationProviderClients()
api_user = LocalProxy(lambda: _request_ctx_stack.top.api_user)
authenticated_service = LocalProxy(lambda: _request_ctx_stack.top.authenticated_service)
@@ -106,7 +106,7 @@ def create_app(application):
)
# If a stub url is provided for SES, then use the stub client rather than the real SES boto client
email_clients = [aws_ses_stub_client] if application.config['SES_STUB_URL'] else [aws_ses_client]
clients.init_app(sms_clients=[firetext_client, mmg_client], email_clients=email_clients)
notification_provider_clients.init_app(sms_clients=[firetext_client, mmg_client], email_clients=email_clients)
notify_celery.init_app(application)
encryption.init_app(application)