mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
test_parsedate_compact(): A test for optional FWS between the comma
and the day number in an RFC 2822 date specification. See bug #552345.
This commit is contained in:
parent
1024bf8364
commit
795833fbc6
1 changed files with 5 additions and 0 deletions
|
|
@ -1670,6 +1670,11 @@ class TestMiscellaneous(unittest.TestCase):
|
|||
def test_parsedate_none(self):
|
||||
self.assertEqual(Utils.parsedate(''), None)
|
||||
|
||||
def test_parsedate_compact(self):
|
||||
# The FWS after the comma is optional
|
||||
self.assertEqual(Utils.parsedate('Wed,3 Apr 2002 14:58:26 +0800'),
|
||||
Utils.parsedate('Wed, 3 Apr 2002 14:58:26 +0800'))
|
||||
|
||||
def test_parseaddr_empty(self):
|
||||
self.assertEqual(Utils.parseaddr('<>'), ('', ''))
|
||||
self.assertEqual(Utils.formataddr(Utils.parseaddr('<>')), '')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue