mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-26 01:03:41 -04:00
More tweaks, trying to get tests to be clean.
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -23,6 +23,7 @@ from app.models import (
|
||||
NOTIFICATION_TEMPORARY_FAILURE,
|
||||
FactNotificationStatus,
|
||||
Notification,
|
||||
NotificationType,
|
||||
NotificationAllTimeView,
|
||||
Service,
|
||||
Template,
|
||||
@@ -467,7 +468,7 @@ def get_total_notifications_for_date_range(start_date, end_date):
|
||||
case(
|
||||
[
|
||||
(
|
||||
FactNotificationStatus.notification_type == "email",
|
||||
FactNotificationStatus.notification_type == NotificationType.EMAIL,
|
||||
FactNotificationStatus.notification_count,
|
||||
)
|
||||
],
|
||||
@@ -478,7 +479,7 @@ def get_total_notifications_for_date_range(start_date, end_date):
|
||||
case(
|
||||
[
|
||||
(
|
||||
FactNotificationStatus.notification_type == "sms",
|
||||
FactNotificationStatus.notification_type == NotificationType.SMS,
|
||||
FactNotificationStatus.notification_count,
|
||||
)
|
||||
],
|
||||
|
||||
@@ -62,7 +62,7 @@ def _get_sms_providers_for_update(time_threshold):
|
||||
# get current priority of both providers
|
||||
q = (
|
||||
ProviderDetails.query.filter(
|
||||
ProviderDetails.notification_type == "sms", ProviderDetails.active
|
||||
ProviderDetails.notification_type == NotificationType.SMS, ProviderDetails.active
|
||||
)
|
||||
.with_for_update()
|
||||
.all()
|
||||
|
||||
@@ -106,7 +106,7 @@ def dao_fetch_live_services_data():
|
||||
case(
|
||||
[
|
||||
(
|
||||
this_year_ft_billing.c.notification_type == "email",
|
||||
this_year_ft_billing.c.notification_type == NotificationType.EMAIL,
|
||||
func.sum(this_year_ft_billing.c.notifications_sent),
|
||||
)
|
||||
],
|
||||
@@ -115,7 +115,7 @@ def dao_fetch_live_services_data():
|
||||
case(
|
||||
[
|
||||
(
|
||||
this_year_ft_billing.c.notification_type == "sms",
|
||||
this_year_ft_billing.c.notification_type == NotificationType.SMS,
|
||||
func.sum(this_year_ft_billing.c.notifications_sent),
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user