mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -04:00
Add note about letters
When trying to send letters using the API, the ‘team and whitelist’ key is confusing. We don’t have addresses for your team members, nor is there a whitelist for letter addresses. The actual behaviour is that you’ll get an error if you try to use this key to send letters. So, for services who have letters available, we should add a hint telling users that team and whitelist is probably not the key they’re looking for.
This commit is contained in:
@@ -268,6 +268,19 @@ def mock_get_live_service(mocker, api_user_active):
|
||||
return mocker.patch('app.service_api_client.get_service', side_effect=_get)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_get_service_with_letters(mocker, api_user_active):
|
||||
def _get(service_id):
|
||||
return {'data': service_json(
|
||||
service_id,
|
||||
users=[api_user_active.id],
|
||||
restricted=False,
|
||||
permissions=['email', 'sms', 'letter']
|
||||
)}
|
||||
|
||||
return mocker.patch('app.service_api_client.get_service', side_effect=_get)
|
||||
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_create_service(mocker):
|
||||
def _create(service_name, message_limit, restricted, user_id, email_from):
|
||||
|
||||
Reference in New Issue
Block a user