mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
More tweaks, trying to get tests to be clean.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from abc import abstractmethod
|
||||
from typing import Protocol
|
||||
|
||||
from app.models import NotificationType
|
||||
from botocore.config import Config
|
||||
|
||||
AWS_CLIENT_CONFIG = Config(
|
||||
@@ -53,10 +54,10 @@ class NotificationProviderClients(object):
|
||||
return self.email_clients.get(name)
|
||||
|
||||
def get_client_by_name_and_type(self, name, notification_type):
|
||||
assert notification_type in ["email", "sms"] # nosec B101
|
||||
assert notification_type in {NotificationType.EMAIL, NotificationType.SMS} # nosec B101
|
||||
|
||||
if notification_type == "email":
|
||||
if notification_type == NotificationType.EMAIL:
|
||||
return self.get_email_client(name)
|
||||
|
||||
if notification_type == "sms":
|
||||
if notification_type == NotificationType.SMS:
|
||||
return self.get_sms_client(name)
|
||||
|
||||
Reference in New Issue
Block a user