mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 00:48:32 +01:00
15 lines
627 B
Python
15 lines
627 B
Python
from app.email_utils import get_email_name, get_email_part
|
|
|
|
|
|
def test_get_email_name():
|
|
assert get_email_name("First Last <ab@cd.com>") == "First Last"
|
|
assert get_email_name("First Last<ab@cd.com>") == "First Last"
|
|
assert get_email_name(" First Last <ab@cd.com>") == "First Last"
|
|
assert get_email_name("ab@cd.com") == ""
|
|
|
|
|
|
def test_get_email_part():
|
|
assert get_email_part("First Last <ab@cd.com>") == "ab@cd.com"
|
|
assert get_email_part("First Last<ab@cd.com>") == "ab@cd.com"
|
|
assert get_email_part(" First Last <ab@cd.com>") == "ab@cd.com"
|
|
assert get_email_part("ab@cd.com") == "ab@cd.com"
|