mirror of
https://github.com/GSA/notifications-api.git
synced 2026-07-24 01:49:42 -04:00
merge from main
This commit is contained in:
301
poetry.lock
generated
301
poetry.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -32,7 +32,7 @@ flask-marshmallow = "==1.2.1"
|
||||
flask-migrate = "==4.0.7"
|
||||
flask-redis = "==0.4.0"
|
||||
flask-sqlalchemy = "==3.1.1"
|
||||
gunicorn = {version = "==22.0.0", extras = ["eventlet"]}
|
||||
gunicorn = {version = "==23.0.0", extras = ["eventlet"]}
|
||||
iso8601 = "==2.1.0"
|
||||
jsonschema = {version = "==4.23.0", extras = ["format"]}
|
||||
lxml = "==5.2.2"
|
||||
@@ -73,7 +73,7 @@ six = "^1.16.0"
|
||||
urllib3 = "^2.2.2"
|
||||
webencodings = "^0.5.1"
|
||||
itsdangerous = "^2.2.0"
|
||||
jinja2 = "^3.1.5"
|
||||
jinja2 = "^3.1.6"
|
||||
redis = "^5.0.8"
|
||||
requests = "^2.32.3"
|
||||
|
||||
|
||||
@@ -36,7 +36,6 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
service_2 = create_service(service_name="service_2")
|
||||
|
||||
create_template(service=service_1)
|
||||
create_template(service=service_1, template_type=TemplateType.EMAIL)
|
||||
# not the service being tested
|
||||
create_template(service=service_2)
|
||||
|
||||
@@ -47,18 +46,9 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
created_at=datetime(2018, 1, 1, 1, x, 0),
|
||||
status=NotificationStatus.DELIVERED,
|
||||
)
|
||||
whats_this = create_notification(
|
||||
create_notification(
|
||||
service_1.templates[0], created_at=datetime(2018, 1, 1, 1, 1, 0)
|
||||
)
|
||||
print(f"WTN status = {whats_this.status} type = {whats_this.notification_type}")
|
||||
questionable_notification = create_notification(
|
||||
service_1.templates[1],
|
||||
created_at=datetime(2018, 1, 1, 1, 1, 0),
|
||||
status=NotificationStatus.DELIVERED,
|
||||
)
|
||||
print(
|
||||
f"QN status = {questionable_notification.status} type = {questionable_notification.notification_type}"
|
||||
)
|
||||
|
||||
create_notification(
|
||||
service_1.templates[0],
|
||||
@@ -84,30 +74,25 @@ def test_fetch_notification_status_for_service_by_month(notify_db_session):
|
||||
fetch_notification_status_for_service_by_month(
|
||||
date(2018, 1, 1), date(2018, 2, 28), service_1.id
|
||||
),
|
||||
key=lambda x: (x.month, x.notification_type, x.notification_status),
|
||||
key=lambda x: (x.month, x.notification_status),
|
||||
)
|
||||
|
||||
assert len(results) == 4
|
||||
assert len(results) == 3
|
||||
|
||||
assert results[0].month.date() == date(2018, 1, 1)
|
||||
assert results[0].notification_type == NotificationType.EMAIL
|
||||
assert results[0].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[0].notification_type == NotificationType.SMS
|
||||
assert results[0].notification_status == NotificationStatus.CREATED
|
||||
assert results[0].count == 1
|
||||
|
||||
assert results[1].month.date() == date(2018, 1, 1)
|
||||
assert results[1].notification_type == NotificationType.SMS
|
||||
assert results[1].notification_status == NotificationStatus.CREATED
|
||||
assert results[1].count == 1
|
||||
assert results[1].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[1].count == 14
|
||||
|
||||
assert results[2].month.date() == date(2018, 1, 1)
|
||||
assert results[2].month.date() == date(2018, 2, 1)
|
||||
assert results[2].notification_type == NotificationType.SMS
|
||||
assert results[2].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[2].count == 14
|
||||
|
||||
assert results[3].month.date() == date(2018, 2, 1)
|
||||
assert results[3].notification_type == NotificationType.SMS
|
||||
assert results[3].notification_status == NotificationStatus.DELIVERED
|
||||
assert results[3].count == 1
|
||||
assert results[2].count == 1
|
||||
|
||||
|
||||
def test_fetch_notification_status_for_service_for_day(notify_db_session):
|
||||
|
||||
Reference in New Issue
Block a user