mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-03 18:01:08 -05:00
Refactor creating nhs branding in tests into a fixture
This commit is contained in:
@@ -53,6 +53,7 @@ from app.models import (
|
||||
from tests import create_admin_authorization_header
|
||||
from tests.app.db import (
|
||||
create_api_key,
|
||||
create_email_branding,
|
||||
create_inbound_number,
|
||||
create_invited_org_user,
|
||||
create_job,
|
||||
@@ -919,6 +920,19 @@ def broadcast_organisation(notify_db_session):
|
||||
return org
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def nhs_email_branding(notify_db_session):
|
||||
# we wipe email_branding table in test db between the tests, so we have to recreate this branding
|
||||
# that is normally present on all environments and applied through migration
|
||||
nhs_email_branding_id = current_app.config['NHS_EMAIL_BRANDING_ID']
|
||||
|
||||
return create_email_branding(
|
||||
id=nhs_email_branding_id,
|
||||
logo='1ac6f483-3105-4c9e-9017-dd7fb2752c44-nhs-blue_x2.png',
|
||||
name='NHS'
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def restore_provider_details(notify_db, notify_db_session):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user