mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-16 20:49:00 -04:00
Remove domains from branding forms
We’re deprecating storing the domain as text on a branding in favour of a database relationship between branding and organisation. We need to do this now in order to remove the validation on these fields (which depends on the data in `domains.yml`)
This commit is contained in:
@@ -53,13 +53,13 @@ def test_get_all_email_branding(mocker):
|
||||
|
||||
def test_create_email_branding(mocker):
|
||||
org_data = {'logo': 'test.png', 'name': 'test name', 'text': 'test name', 'colour': 'red',
|
||||
'domain': 'sample.com', 'brand_type': 'org'}
|
||||
'brand_type': 'org'}
|
||||
|
||||
mock_post = mocker.patch('app.notify_client.email_branding_client.EmailBrandingClient.post')
|
||||
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
|
||||
EmailBrandingClient().create_email_branding(
|
||||
logo=org_data['logo'], name=org_data['name'], text=org_data['text'], colour=org_data['colour'],
|
||||
domain=org_data['domain'], brand_type='org'
|
||||
brand_type='org'
|
||||
)
|
||||
|
||||
mock_post.assert_called_once_with(
|
||||
@@ -72,13 +72,13 @@ def test_create_email_branding(mocker):
|
||||
|
||||
def test_update_email_branding(mocker, fake_uuid):
|
||||
org_data = {'logo': 'test.png', 'name': 'test name', 'text': 'test name', 'colour': 'red',
|
||||
'domain': 'sample.com', 'brand_type': 'org'}
|
||||
'brand_type': 'org'}
|
||||
|
||||
mock_post = mocker.patch('app.notify_client.email_branding_client.EmailBrandingClient.post')
|
||||
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
|
||||
EmailBrandingClient().update_email_branding(
|
||||
branding_id=fake_uuid, logo=org_data['logo'], name=org_data['name'], text=org_data['text'],
|
||||
colour=org_data['colour'], domain=org_data['domain'], brand_type='org')
|
||||
colour=org_data['colour'], brand_type='org')
|
||||
|
||||
mock_post.assert_called_once_with(
|
||||
url='/email-branding/{}'.format(fake_uuid),
|
||||
|
||||
@@ -39,13 +39,13 @@ def test_get_all_letter_branding(mocker):
|
||||
|
||||
|
||||
def test_create_letter_branding(mocker):
|
||||
new_branding = {'filename': 'uuid-test', 'name': 'my letters', 'domain': 'example.com'}
|
||||
new_branding = {'filename': 'uuid-test', 'name': 'my letters'}
|
||||
|
||||
mock_post = mocker.patch('app.notify_client.letter_branding_client.LetterBrandingClient.post')
|
||||
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
|
||||
|
||||
LetterBrandingClient().create_letter_branding(
|
||||
filename=new_branding['filename'], name=new_branding['name'], domain=new_branding['domain']
|
||||
filename=new_branding['filename'], name=new_branding['name'],
|
||||
)
|
||||
mock_post.assert_called_once_with(
|
||||
url='/letter-branding',
|
||||
@@ -56,12 +56,12 @@ def test_create_letter_branding(mocker):
|
||||
|
||||
|
||||
def test_update_letter_branding(mocker, fake_uuid):
|
||||
branding = {'filename': 'uuid-test', 'name': 'my letters', 'domain': 'example.com'}
|
||||
branding = {'filename': 'uuid-test', 'name': 'my letters'}
|
||||
|
||||
mock_post = mocker.patch('app.notify_client.letter_branding_client.LetterBrandingClient.post')
|
||||
mock_redis_delete = mocker.patch('app.extensions.RedisClient.delete')
|
||||
LetterBrandingClient().update_letter_branding(
|
||||
branding_id=fake_uuid, filename=branding['filename'], name=branding['name'], domain=branding['domain'])
|
||||
branding_id=fake_uuid, filename=branding['filename'], name=branding['name'])
|
||||
|
||||
mock_post.assert_called_once_with(
|
||||
url='/letter-branding/{}'.format(fake_uuid),
|
||||
|
||||
Reference in New Issue
Block a user