More tweaks, trying to get tests to be clean.

Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
Cliff Hill
2024-01-10 11:18:33 -05:00
parent 908d695b54
commit ac9591ec7c
18 changed files with 37 additions and 29 deletions

View File

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