Ensured that the feeds framework supports both datetimes and dates. Refs #4076.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
a8e1d134a5
commit
22d738c2dc
|
@ -42,6 +42,15 @@ class FeedgeneratorTest(unittest.TestCase):
|
|||
"Fri, 14 Nov 2008 13:37:00 +0100"
|
||||
)
|
||||
|
||||
def test_rfc2822_date_without_time(self):
|
||||
"""
|
||||
Test rfc2822_date() correctly formats date objects.
|
||||
"""
|
||||
self.assertEqual(
|
||||
feedgenerator.rfc2822_date(datetime.date(2008, 11, 14)),
|
||||
"Fri, 14 Nov 2008 00:00:00 -0000"
|
||||
)
|
||||
|
||||
def test_rfc3339_date(self):
|
||||
"""
|
||||
Test rfc3339_date() correctly formats datetime objects.
|
||||
|
@ -60,6 +69,15 @@ class FeedgeneratorTest(unittest.TestCase):
|
|||
"2008-11-14T13:37:00+02:00"
|
||||
)
|
||||
|
||||
def test_rfc3339_date_without_time(self):
|
||||
"""
|
||||
Test rfc3339_date() correctly formats date objects.
|
||||
"""
|
||||
self.assertEqual(
|
||||
feedgenerator.rfc3339_date(datetime.date(2008, 11, 14)),
|
||||
"2008-11-14T00:00:00Z"
|
||||
)
|
||||
|
||||
def test_atom1_mime_type(self):
|
||||
"""
|
||||
Test to make sure Atom MIME type has UTF8 Charset parameter set
|
||||
|
|
Loading…
Reference in New Issue