Change the mock

This commit is contained in:
Rebecca Law
2019-01-24 11:13:50 +00:00
parent e4ea208d06
commit a66b078065
3 changed files with 8 additions and 2 deletions

View File

View 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)

View File

@@ -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)