mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 01:41:05 -05:00
Create a new query for template monthly stats.
This commit is contained in:
@@ -28,13 +28,7 @@ def test_get_template_usage_by_month_returns_correct_data(
|
||||
admin_request,
|
||||
sample_template
|
||||
):
|
||||
create_notification(sample_template, created_at=datetime(2016, 4, 1), status='created')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='sending')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='permanent-failure')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='temporary-failure')
|
||||
|
||||
daily_stats_template_usage_by_month()
|
||||
|
||||
create_ft_notification_status(bst_date=date(2017, 4, 2), template=sample_template, count=3)
|
||||
create_notification(sample_template, created_at=datetime.utcnow())
|
||||
|
||||
resp_json = admin_request.get(
|
||||
@@ -85,14 +79,8 @@ def test_get_template_usage_by_month_returns_two_templates(admin_request, sample
|
||||
template_name=PRECOMPILED_TEMPLATE_NAME,
|
||||
hidden=True
|
||||
)
|
||||
|
||||
create_notification(template_one, created_at=datetime(2017, 4, 1), status='created')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='sending')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='permanent-failure')
|
||||
create_notification(sample_template, created_at=datetime(2017, 4, 1), status='temporary-failure')
|
||||
|
||||
daily_stats_template_usage_by_month()
|
||||
|
||||
create_ft_notification_status(bst_date=datetime(2017, 4, 1), template=template_one, count=1)
|
||||
create_ft_notification_status(bst_date=datetime(2017, 4, 1), template=sample_template, count=3)
|
||||
create_notification(sample_template, created_at=datetime.utcnow())
|
||||
|
||||
resp_json = admin_request.get(
|
||||
|
||||
Reference in New Issue
Block a user