mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-23 07:46:06 -04:00
fix tests
This commit is contained in:
@@ -10,7 +10,7 @@ from flask import current_app
|
|||||||
from requests import HTTPError, RequestException, request
|
from requests import HTTPError, RequestException, request
|
||||||
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
from sqlalchemy.exc import IntegrityError, SQLAlchemyError
|
||||||
|
|
||||||
from app import create_uuid, encryption, notify_celery
|
from app import create_uuid, get_encryption, notify_celery
|
||||||
from app.aws import s3
|
from app.aws import s3
|
||||||
from app.celery import provider_tasks
|
from app.celery import provider_tasks
|
||||||
from app.config import Config, QueueNames
|
from app.config import Config, QueueNames
|
||||||
@@ -38,6 +38,8 @@ from app.service.utils import service_allowed_to_send_to
|
|||||||
from app.utils import DATETIME_FORMAT, hilite, utc_now
|
from app.utils import DATETIME_FORMAT, hilite, utc_now
|
||||||
from notifications_utils.recipients import RecipientCSV
|
from notifications_utils.recipients import RecipientCSV
|
||||||
|
|
||||||
|
encryption = get_encryption()
|
||||||
|
|
||||||
|
|
||||||
@notify_celery.task(name="process-job")
|
@notify_celery.task(name="process-job")
|
||||||
def process_job(job_id, sender_id=None):
|
def process_job(job_id, sender_id=None):
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ def test_process_row_sends_letter_task(
|
|||||||
):
|
):
|
||||||
mocker.patch("app.celery.tasks.create_uuid", return_value="noti_uuid")
|
mocker.patch("app.celery.tasks.create_uuid", return_value="noti_uuid")
|
||||||
task_mock = mocker.patch(f"app.celery.tasks.{expected_function}.apply_async")
|
task_mock = mocker.patch(f"app.celery.tasks.{expected_function}.apply_async")
|
||||||
encrypt_mock = mocker.patch("app.celery.tasks.encrypt")
|
encrypt_mock = mocker.patch("app.celery.tasks.encryption.encrypt")
|
||||||
template = Mock(id="template_id", template_type=template_type)
|
template = Mock(id="template_id", template_type=template_type)
|
||||||
job = Mock(id="job_id", template_version="temp_vers")
|
job = Mock(id="job_id", template_version="temp_vers")
|
||||||
service = Mock(id="service_id")
|
service = Mock(id="service_id")
|
||||||
|
|||||||
Reference in New Issue
Block a user