summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSunaina Pai <sunainapai.in@gmail.com>2018-06-16 16:18:57 +0530
committerSunaina Pai <sunainapai.in@gmail.com>2018-06-16 16:18:57 +0530
commit99c8e268a6c2c75943e1069ff95a5d64e1e19908 (patch)
tree91f5ec5c4e89f60b440d2862317f5f578bcc0758 /test
parent6c0d374ff14bbe76c8af7e585c8fecd26f25e912 (diff)
Use RFC 2822 format date in RSS feeds
Diffstat (limited to 'test')
-rw-r--r--test/test_rfc_2822_date.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_rfc_2822_date.py b/test/test_rfc_2822_date.py
new file mode 100644
index 0000000..db9970f
--- /dev/null
+++ b/test/test_rfc_2822_date.py
@@ -0,0 +1,13 @@
+import unittest
+import makesite
+
+
+class RFC822DateTest(unittest.TestCase):
+
+ def test_epoch(self):
+ self.assertEqual(makesite.rfc_2822_format('1970-01-01'),
+ 'Thu, 01 Jan 1970 00:00:00 +0000')
+
+ def test_2018_06_16(self):
+ self.assertEqual(makesite.rfc_2822_format('2018-06-16'),
+ 'Sat, 16 Jun 2018 00:00:00 +0000')