projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1024bf8
)
test_parsedate_compact(): A test for optional FWS between the comma
author
Barry Warsaw
<barry@python.org>
Mon, 30 Dec 2002 17:20:53 +0000
(17:20 +0000)
committer
Barry Warsaw
<barry@python.org>
Mon, 30 Dec 2002 17:20:53 +0000
(17:20 +0000)
and the day number in an RFC 2822 date specification. See bug
#552345.
Lib/email/test/test_email.py
patch
|
blob
|
history
diff --git
a/Lib/email/test/test_email.py
b/Lib/email/test/test_email.py
index cbcc0df1b11a09017f1f0614dc2c9cf8f21763c5..df6c350957ba429a78cbb74beb0d67a5783d7af7 100644
(file)
--- a/
Lib/email/test/test_email.py
+++ b/
Lib/email/test/test_email.py
@@
-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('<>')), '')