mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-23 00:41:35 -05:00
Put the statistics tasks into a new queue. This currently has no worker in PaaS so blocks the deployment until new PaaS worker is configured.
This commit is contained in:
@@ -14,7 +14,7 @@ def test_should_create_initial_job_task_if_notification_is_related_to_a_job(
|
||||
mock = mocker.patch("app.celery.statistics_tasks.record_initial_job_statistics.apply_async")
|
||||
notification = sample_notification(notify_db, notify_db_session, job=sample_job)
|
||||
create_initial_notification_statistic_tasks(notification)
|
||||
mock.assert_called_once_with((str(notification.id), ), queue="notify")
|
||||
mock.assert_called_once_with((str(notification.id), ), queue="statistics")
|
||||
|
||||
|
||||
def test_should_not_create_initial_job_task_if_notification_is_related_to_a_job(
|
||||
@@ -31,7 +31,7 @@ def test_should_create_outcome_job_task_if_notification_is_related_to_a_job(
|
||||
mock = mocker.patch("app.celery.statistics_tasks.record_outcome_job_statistics.apply_async")
|
||||
notification = sample_notification(notify_db, notify_db_session, job=sample_job)
|
||||
create_outcome_notification_statistic_tasks(notification)
|
||||
mock.assert_called_once_with((str(notification.id), ), queue="notify")
|
||||
mock.assert_called_once_with((str(notification.id), ), queue="statistics")
|
||||
|
||||
|
||||
def test_should_not_create_outcome_job_task_if_notification_is_related_to_a_job(
|
||||
@@ -42,7 +42,6 @@ def test_should_not_create_outcome_job_task_if_notification_is_related_to_a_job(
|
||||
mock.assert_not_called()
|
||||
|
||||
|
||||
|
||||
def test_should_call_create_job_stats_dao_methods(notify_db, notify_db_session, sample_notification, mocker):
|
||||
dao_mock = mocker.patch("app.celery.statistics_tasks.create_or_update_job_sending_statistics")
|
||||
record_initial_job_statistics(str(sample_notification.id))
|
||||
|
||||
Reference in New Issue
Block a user