Skip to content

Commit

Permalink
Failing test case for case where parse_list() received Address object.
Browse files Browse the repository at this point in the history
  • Loading branch information
spang committed Jan 13, 2015
1 parent a63fe09 commit ede112b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/addresslib/address_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,16 @@ def test_addresslist_non_ascii_list_input():
eq_('Os Wi <[email protected]>', lst[1].full_spec())


def test_addresslist_address_obj_list_input():
al = [EmailAddress(u'Aurélien Berger <[email protected]>'),
UrlAddress('https://www.example.com')]
lst = parse_list(al)
eq_(2, len(lst))
eq_('=?utf-8?q?Aur=C3=A9lien_Berger?= <[email protected]>',
lst[0].full_spec())
eq_('https://www.example.com', lst[1].full_spec())


def test_edge_cases():
email = EmailAddress('"foo.bar@"@example.com')
eq_('"foo.bar@"@example.com', email.address)
Expand Down

0 comments on commit ede112b

Please sign in to comment.