This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
python-emails/emails/testsuite/test_utils.py

11 lines
439 B
Python

# encoding: utf-8
from __future__ import unicode_literals
from emails.utils import parse_name_and_email
def test_parse_name_and_email():
assert parse_name_and_email('john@smith.me') == (None, 'john@smith.me')
assert parse_name_and_email('"John Smith" <john@smith.me>') == \
('John Smith', 'john@smith.me')
assert parse_name_and_email(['John Smith', 'john@smith.me']) == \
('John Smith', 'john@smith.me')