mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Remove govuk from possible brands
‘GOV.UK’ doesn’t make sense as a type of brand. It only made sense as a type of branding that a service had. Since we’ve: - deprecated the service branding column - made sure it’s not used as a value in the email branding table we can remove this value from the table of possible brand types.
This commit is contained in:
@@ -21,7 +21,6 @@ from app.models import (
|
||||
KEY_TYPE_TEST,
|
||||
KEY_TYPE_TEAM,
|
||||
BRANDING_ORG,
|
||||
BRANDING_GOVUK,
|
||||
BRANDING_BOTH,
|
||||
BRANDING_ORG_BANNER
|
||||
)
|
||||
@@ -202,7 +201,6 @@ def test_send_sms_should_use_template_version_from_notification_not_latest(
|
||||
def test_should_call_send_sms_response_task_if_research_mode(
|
||||
notify_db, sample_service, sample_notification, mocker, research_mode, key_type
|
||||
):
|
||||
sample_service.branding = BRANDING_GOVUK
|
||||
mocker.patch('app.mmg_client.send_sms')
|
||||
mocker.patch('app.delivery.send_to_providers.send_sms_response')
|
||||
|
||||
@@ -446,15 +444,8 @@ def test_get_html_email_renderer_with_branding_details(branding_type, govuk_bann
|
||||
|
||||
|
||||
def test_get_html_email_renderer_with_branding_details_and_render_govuk_banner_only(notify_db, sample_service):
|
||||
email_branding = EmailBranding(
|
||||
brand_type=BRANDING_GOVUK,
|
||||
colour='#000000',
|
||||
logo='justice-league.png',
|
||||
name='Justice League',
|
||||
text='League of Justice',
|
||||
)
|
||||
sample_service.email_branding = email_branding
|
||||
notify_db.session.add_all([sample_service, email_branding])
|
||||
sample_service.email_branding = None
|
||||
notify_db.session.add_all([sample_service])
|
||||
notify_db.session.commit()
|
||||
|
||||
options = send_to_providers.get_html_email_options(sample_service)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
|
||||
from app.models import EmailBranding, BRANDING_GOVUK, BRANDING_ORG
|
||||
from app.models import EmailBranding, BRANDING_ORG
|
||||
from tests.app.db import create_email_branding
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ def test_post_create_email_branding_without_brand_type_defaults(admin_request, n
|
||||
_data=data,
|
||||
_expected_status=201
|
||||
)
|
||||
assert BRANDING_GOVUK == response['data']['brand_type']
|
||||
assert BRANDING_ORG == response['data']['brand_type']
|
||||
|
||||
|
||||
def test_post_create_email_branding_without_logo_is_ok(admin_request, notify_db_session):
|
||||
@@ -240,7 +240,7 @@ def test_create_email_branding_reject_invalid_brand_type(admin_request):
|
||||
_expected_status=400
|
||||
)
|
||||
|
||||
assert response['errors'][0]['message'] == 'brand_type NOT A TYPE is not one of [govuk, org, both, org_banner]'
|
||||
assert response['errors'][0]['message'] == 'brand_type NOT A TYPE is not one of [org, both, org_banner]'
|
||||
|
||||
|
||||
def test_update_email_branding_reject_invalid_brand_type(admin_request, notify_db_session):
|
||||
@@ -256,4 +256,4 @@ def test_update_email_branding_reject_invalid_brand_type(admin_request, notify_d
|
||||
email_branding_id=email_branding.id
|
||||
)
|
||||
|
||||
assert response['errors'][0]['message'] == 'brand_type NOT A TYPE is not one of [govuk, org, both, org_banner]'
|
||||
assert response['errors'][0]['message'] == 'brand_type NOT A TYPE is not one of [org, both, org_banner]'
|
||||
|
||||
Reference in New Issue
Block a user