mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-24 01:11:38 -05:00
refactor performance platform code
so that it doesn't appear generic when it's actually specific to sending the daily notification totals. To do this, split it out into a separate performance_platform directory, containing the business logic, and make the performance_platform_client incredibly thin - all it handles is adding ids to payloads, and sending stats. Also, some changes to the config (not all done yet) since there is one token per endpoint, not one for the whole platform as we'd previously coded
This commit is contained in:
@@ -276,7 +276,7 @@ def test_send_daily_performance_stats_calls_does_not_send_if_inactive(
|
||||
sample_template,
|
||||
mocker
|
||||
):
|
||||
send_mock = mocker.patch('app.celery.scheduled_tasks.performance_platform_client.send_performance_stats')
|
||||
send_mock = mocker.patch('app.celery.scheduled_tasks.total_sent_notifications.send_total_notifications_sent_for_day_stats')
|
||||
|
||||
with patch.object(
|
||||
PerformancePlatformClient,
|
||||
@@ -296,7 +296,7 @@ def test_send_daily_performance_stats_calls_with_correct_totals(
|
||||
sample_template,
|
||||
mocker
|
||||
):
|
||||
perf_mock = mocker.patch('app.celery.scheduled_tasks.performance_platform_client.send_performance_stats')
|
||||
perf_mock = mocker.patch('app.celery.scheduled_tasks.total_sent_notifications.send_total_notifications_sent_for_day_stats')
|
||||
|
||||
notification_history = partial(
|
||||
create_notification_history,
|
||||
|
||||
Reference in New Issue
Block a user