mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 10:21:14 -05:00
Fix conflict
This commit is contained in:
@@ -20,7 +20,6 @@ def test_get_whitelist_returns_data(client, sample_service_whitelist):
|
|||||||
'phone_numbers': []
|
'phone_numbers': []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def test_get_whitelist_separates_emails_and_phones(client, sample_service):
|
def test_get_whitelist_separates_emails_and_phones(client, sample_service):
|
||||||
dao_add_and_commit_whitelisted_contacts([
|
dao_add_and_commit_whitelisted_contacts([
|
||||||
ServiceWhitelist.from_string(sample_service.id, EMAIL_TYPE, 'service@example.com'),
|
ServiceWhitelist.from_string(sample_service.id, EMAIL_TYPE, 'service@example.com'),
|
||||||
@@ -28,7 +27,6 @@ def test_get_whitelist_separates_emails_and_phones(client, sample_service):
|
|||||||
])
|
])
|
||||||
|
|
||||||
response = client.get('service/{}/whitelist'.format(sample_service.id), headers=[create_authorization_header()])
|
response = client.get('service/{}/whitelist'.format(sample_service.id), headers=[create_authorization_header()])
|
||||||
|
|
||||||
assert response.status_code == 200
|
assert response.status_code == 200
|
||||||
assert json.loads(response.get_data(as_text=True)) == {
|
assert json.loads(response.get_data(as_text=True)) == {
|
||||||
'email_addresses': ['service@example.com'],
|
'email_addresses': ['service@example.com'],
|
||||||
@@ -68,12 +66,11 @@ def test_update_whitelist_replaces_old_whitelist(client, sample_service_whitelis
|
|||||||
)
|
)
|
||||||
|
|
||||||
assert response.status_code == 204
|
assert response.status_code == 204
|
||||||
whitelist = ServiceWhitelist.query.all()
|
whitelist = ServiceWhitelist.query.order_by(ServiceWhitelist.recipient).all()
|
||||||
assert len(whitelist) == 2
|
assert len(whitelist) == 2
|
||||||
assert whitelist[0].recipient == '07123456789'
|
assert whitelist[0].recipient == '07123456789'
|
||||||
assert whitelist[1].recipient == 'foo@bar.com'
|
assert whitelist[1].recipient == 'foo@bar.com'
|
||||||
|
|
||||||
|
|
||||||
def test_update_whitelist_doesnt_remove_old_whitelist_if_error(client, sample_service_whitelist):
|
def test_update_whitelist_doesnt_remove_old_whitelist_if_error(client, sample_service_whitelist):
|
||||||
|
|
||||||
data = {
|
data = {
|
||||||
|
|||||||
Reference in New Issue
Block a user