mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-19 05:58:53 -04:00
Fixing tests, fixing tests...
Signed-off-by: Cliff Hill <Clifford.hill@gsa.gov>
This commit is contained in:
@@ -2102,7 +2102,7 @@ def test_set_sms_prefixing_for_service_cant_be_none(
|
||||
{
|
||||
StatisticsType.REQUESTED: 2,
|
||||
StatisticsType.DELIVERED: 1,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
),
|
||||
(
|
||||
@@ -2110,7 +2110,7 @@ def test_set_sms_prefixing_for_service_cant_be_none(
|
||||
{
|
||||
StatisticsType.REQUESTED: 1,
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -2158,12 +2158,12 @@ def test_get_services_with_detailed_flag(client, sample_template):
|
||||
assert data[0]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 3,
|
||||
},
|
||||
}
|
||||
@@ -2189,12 +2189,12 @@ def test_get_services_with_detailed_flag_excluding_from_test_key(
|
||||
assert data[0]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 2,
|
||||
},
|
||||
}
|
||||
@@ -2267,12 +2267,12 @@ def test_get_detailed_services_groups_by_service(notify_db_session):
|
||||
assert data[0]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 1,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 3,
|
||||
},
|
||||
}
|
||||
@@ -2280,12 +2280,12 @@ def test_get_detailed_services_groups_by_service(notify_db_session):
|
||||
assert data[1]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 1,
|
||||
},
|
||||
}
|
||||
@@ -2312,12 +2312,12 @@ def test_get_detailed_services_includes_services_with_no_notifications(
|
||||
assert data[0]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 1,
|
||||
},
|
||||
}
|
||||
@@ -2325,12 +2325,12 @@ def test_get_detailed_services_includes_services_with_no_notifications(
|
||||
assert data[1]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
}
|
||||
@@ -2354,12 +2354,12 @@ def test_get_detailed_services_only_includes_todays_notifications(sample_templat
|
||||
assert data[0]["statistics"] == {
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
},
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 3,
|
||||
},
|
||||
}
|
||||
@@ -2407,12 +2407,12 @@ def test_get_detailed_services_for_date_range(
|
||||
assert len(data) == 1
|
||||
assert data[0]["statistics"][NotificationType.EMAIL] == {
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 0,
|
||||
}
|
||||
assert data[0]["statistics"][NotificationType.SMS] == {
|
||||
StatisticsType.DELIVERED: 2,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
StatisticsType.REQUESTED: 2,
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ def test_get_template_usage_by_month_returns_two_templates(
|
||||
{
|
||||
StatisticsType.REQUESTED: 2,
|
||||
StatisticsType.DELIVERED: 1,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
),
|
||||
(
|
||||
@@ -125,7 +125,7 @@ def test_get_template_usage_by_month_returns_two_templates(
|
||||
{
|
||||
StatisticsType.REQUESTED: 1,
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -161,12 +161,12 @@ def test_get_service_notification_statistics_with_unknown_service(admin_request)
|
||||
NotificationType.SMS: {
|
||||
StatisticsType.REQUESTED: 0,
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
NotificationType.EMAIL: {
|
||||
StatisticsType.REQUESTED: 0,
|
||||
StatisticsType.DELIVERED: 0,
|
||||
StatisticsType.FAILED: 0,
|
||||
StatisticsType.FAILURE: 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user