mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Update the service name validation in the ServiceNameForm and AddServiceForm to check the email_safe version
of the name against a list of all service email_from fields. Update find_all_service_names to find_all_service_email_from, which returns the email_from of all services.
This commit is contained in:
@@ -60,10 +60,10 @@ def mock_get_service(mocker, api_user_active):
|
||||
|
||||
@pytest.fixture(scope='function')
|
||||
def mock_create_service(mocker):
|
||||
def _create(service_name, active, limit, restricted, user_id):
|
||||
def _create(service_name, active, limit, restricted, user_id, email_from):
|
||||
service = service_json(
|
||||
101, service_name, [user_id], limit=limit,
|
||||
active=active, restricted=restricted)
|
||||
active=active, restricted=restricted, email_from=email_from)
|
||||
return service['id']
|
||||
|
||||
return mocker.patch(
|
||||
|
||||
Reference in New Issue
Block a user