Skip to content
Closed
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
Next Next commit
bpo-28879 : escape the date example string
  • Loading branch information
elafontaine committed Aug 3, 2017
commit 9c1a12176314524d15ad2190e4736e15a5a820a4
2 changes: 1 addition & 1 deletion Lib/test/test_smtplib.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def testSendMessageAddDateIfMissing(self, mocked_date_obj):
mexpect = '%s%s\n%s' % (MSG_BEGIN, m.as_string(), MSG_END)
self.assertEqual(self.output.getvalue(), mexpect)
debugout = smtpd.DEBUGSTREAM.getvalue()
Date = re.compile(''.join(("\\nDate: ", current_date)), re.MULTILINE)
Date = re.compile(''.join(("\\\\nDate: ", re.escape(current_date))), re.MULTILINE)
self.assertRegex(debugout, Date)


Expand Down