summaryrefslogtreecommitdiff
path: root/Lib/email/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/email/test')
-rw-r--r--Lib/email/test/test_email.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index f2aa8d7f55..745260ed98 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -2037,6 +2037,15 @@ class TestMiscellaneous(unittest.TestCase):
Utils.parsedate(Utils.formatdate(now, localtime=True))[:6],
time.localtime(now)[:6])
+ def test_formatdate_usegmt(self):
+ now = time.time()
+ self.assertEqual(
+ Utils.formatdate(now, localtime=False),
+ time.strftime('%a, %d %b %Y %H:%M:%S -0000', time.gmtime(now)))
+ self.assertEqual(
+ Utils.formatdate(now, localtime=False, usegmt=True),
+ time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime(now)))
+
def test_parsedate_none(self):
self.assertEqual(Utils.parsedate(''), None)