mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-24 00:07:02 -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:
8
tests/app/test_utils.py
Normal file
8
tests/app/test_utils.py
Normal file
@@ -0,0 +1,8 @@
|
||||
from app.utils import email_safe
|
||||
|
||||
|
||||
def test_email_safe_return_dot_separated_email_domain():
|
||||
test_name = 'SOME service with+stuff+ b123'
|
||||
expected = 'some.service.withstuff.b123'
|
||||
actual = email_safe(test_name)
|
||||
assert actual == expected
|
||||
Reference in New Issue
Block a user