mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 07:51:13 -05:00
Change the mock
This commit is contained in:
0
app/letter_branding/__init__.py
Normal file
0
app/letter_branding/__init__.py
Normal file
6
app/letter_branding/letter_branding_rest.py
Normal file
6
app/letter_branding/letter_branding_rest.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from flask import Blueprint
|
||||||
|
|
||||||
|
from app.errors import register_errors
|
||||||
|
|
||||||
|
email_branding_blueprint = Blueprint('letter_branding', __name__, url_prefix='letter-branding')
|
||||||
|
register_errors(email_branding_blueprint)
|
||||||
@@ -187,7 +187,7 @@ def test_create_letters_gets_the_right_logo_when_service_has_dvla_logo(
|
|||||||
notify_api, mocker, sample_letter_notification
|
notify_api, mocker, sample_letter_notification
|
||||||
):
|
):
|
||||||
mock_get_letters_pdf = mocker.patch('app.celery.letters_pdf_tasks.get_letters_pdf', return_value=(b'\x00\x01', 1))
|
mock_get_letters_pdf = mocker.patch('app.celery.letters_pdf_tasks.get_letters_pdf', return_value=(b'\x00\x01', 1))
|
||||||
mocker.patch('app.letters.utils.upload_letter_pdf')
|
mocker.patch('app.letters.utils.s3upload')
|
||||||
mocker.patch('app.celery.letters_pdf_tasks.update_notification_status_by_id')
|
mocker.patch('app.celery.letters_pdf_tasks.update_notification_status_by_id')
|
||||||
|
|
||||||
create_letters_pdf(sample_letter_notification.id)
|
create_letters_pdf(sample_letter_notification.id)
|
||||||
@@ -206,7 +206,7 @@ def test_create_letters_gets_the_right_logo_when_service_has_letter_branding_log
|
|||||||
letter_branding = create_letter_branding(name='test brand', filename='test-brand', platform_default=False)
|
letter_branding = create_letter_branding(name='test brand', filename='test-brand', platform_default=False)
|
||||||
sample_letter_notification.service.letter_branding = letter_branding
|
sample_letter_notification.service.letter_branding = letter_branding
|
||||||
mock_get_letters_pdf = mocker.patch('app.celery.letters_pdf_tasks.get_letters_pdf', return_value=(b'\x00\x01', 1))
|
mock_get_letters_pdf = mocker.patch('app.celery.letters_pdf_tasks.get_letters_pdf', return_value=(b'\x00\x01', 1))
|
||||||
mocker.patch('app.letters.utils.upload_letter_pdf')
|
mocker.patch('app.letters.utils.s3upload')
|
||||||
mocker.patch('app.celery.letters_pdf_tasks.update_notification_status_by_id')
|
mocker.patch('app.celery.letters_pdf_tasks.update_notification_status_by_id')
|
||||||
|
|
||||||
create_letters_pdf(sample_letter_notification.id)
|
create_letters_pdf(sample_letter_notification.id)
|
||||||
|
|||||||
Reference in New Issue
Block a user