10000 gh-134155: fix AttributeError in email._header_value_parser.get_address by sergey-miryanov · Pull Request #134194 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-134155: fix AttributeError in email._header_value_parser.get_address #134194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Tweak new tests for get_address
  • Loading branch information
sergey-miryanov committed May 27, 2025
commit be40930213a2492334fb1344b4da2c1403b3276b
2 changes: 2 additions & 0 deletions Lib/test/test_email/test__header_value_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2505,6 +2505,7 @@ def test_get_address_with_invalid_domain(self):
self.assertEqual(len(address.all_mailboxes), 1)
self.assertEqual(address.all_mailboxes[0].domain, '[]')
self.assertEqual(address.all_mailboxes[0].local_part, 'T')
self.assertEqual(address.all_mailboxes[0].token_type, 'invalid-mailbox')
self.assertEqual(address[0].token_type, 'invalid-mailbox')

address = self._test_get_x(parser.get_address,
Expand All @@ -2520,6 +2521,7 @@ def test_get_address_with_invalid_domain(self):
self.assertEqual(len(address.all_mailboxes), 1)
self.assertEqual(address.all_mailboxes[0].domain, '[C]')
self.assertEqual(address.all_mailboxes[0].local_part, '=m==fr2')
self.assertEqual(address.all_mailboxes[0].token_type, 'invalid-mailbox')
self.assertEqual(address[0].token_type, 'group')

# get_address_list
Expand Down
Loading
0