mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 23:55:58 -05:00
allow you to pass in date to send perf stats
make it easier to replay sending data for a day if it failed the first time round
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from datetime import datetime, timedelta
|
||||
from datetime import datetime, timedelta, date
|
||||
|
||||
from freezegun import freeze_time
|
||||
|
||||
@@ -19,7 +19,7 @@ def test_send_processing_time_to_performance_platform_generates_correct_calls(mo
|
||||
create_notification(sample_template, created_at=created_at, sent_at=created_at + timedelta(seconds=15))
|
||||
create_notification(sample_template, created_at=datetime.utcnow() - timedelta(days=2))
|
||||
|
||||
send_processing_time_to_performance_platform()
|
||||
send_processing_time_to_performance_platform(date(2016, 10, 17))
|
||||
|
||||
send_mock.assert_any_call(datetime(2016, 10, 16, 23, 0), 'messages-total', 2)
|
||||
send_mock.assert_any_call(datetime(2016, 10, 16, 23, 0), 'messages-within-10-secs', 1)
|
||||
|
||||
Reference in New Issue
Block a user