diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2017-09-06 14:10:35 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2017-09-06 14:28:23 -0700 |
commit | e1b17942b0ec6fbd351df4c807debd4dc141dcdb (patch) | |
tree | a3f70118d78999eb99beb9fbc4b18286c31c5a3b /tests | |
parent | 994320a2750bf6a765cc80d6d8e7ee44927ea3f7 (diff) |
account: Fix Address comparison to b'' and u''
This uses a try/except because comparing an address to an empty string
should be a fairly uncommon event and try/except will be faster than
`if '@' not in other` in the case where '@' is in other.
This stops alot from crashing if there is no 'From' header in the
email. Outlook generates drafts without a 'From' header.
Fixes #1050
Diffstat (limited to 'tests')
-rw-r--r-- | tests/account_test.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/account_test.py b/tests/account_test.py index 5761e62f..cfc51bf8 100644 --- a/tests/account_test.py +++ b/tests/account_test.py @@ -164,7 +164,6 @@ class TestAddress(unittest.TestCase): addr = account.Address(u'user', u'éxample.com', case_sensitive=True) self.assertEqual(addr, u'user@Éxample.com') - @unittest.expectedFailure def test_cmp_empty(self): addr = account.Address(u'user', u'éxample.com') self.assertNotEqual(addr, u'') |