Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
srinivasreddy committed Dec 18, 2024
1 parent 3ac53da commit 4882f44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Lib/test/test_email/test_email.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ def test_invalid_header_names(self):
method=method,
):
with self.assertRaises(ValueError) as cm:
getattr(Message(policy=thispolicy), method(name, value))
getattr(Message(policy=thispolicy), method)(name, value)
msg = str(cm.exception)
self.assertRegex(msg,'(?i)(?=.*invalid)(?=.*header)(?=.*name)')
self.assertIn(f"{name!r}", msg)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_email/test_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ def test_invalid_header_names(self):
method=method,
):
with self.assertRaises(ValueError) as cm:
getattr(EmailMessage(policy=thispolicy), method(name, value))
getattr(EmailMessage(policy=thispolicy), method)(name, value)
msg = str(cm.exception)
self.assertRegex( msg, '(?i)(?=.*invalid)(?=.*header)(?=.*name)')
self.assertIn(f"{name!r}", msg)
Expand Down

0 comments on commit 4882f44

Please sign in to comment.