def test_latest_post_date(self):
    '\n        Test that both the published and updated dates are\n        considered when determining the latest post date.\n        '
    response = self.client.get('/syndication/atom/')
    feed = minidom.parseString(response.content).firstChild
    updated = feed.getElementsByTagName('updated')[0].firstChild.wholeText
    d = Entry.objects.latest('published').published
    ltz = tzinfo.LocalTimezone(d)
    latest_published = rfc3339_date(d.replace(tzinfo=ltz))
    self.assertEqual(updated, latest_published)
    response = self.client.get('/syndication/latest/')
    feed = minidom.parseString(response.content).firstChild
    updated = feed.getElementsByTagName('updated')[0].firstChild.wholeText
    d = Entry.objects.exclude(pk=5).latest('updated').updated
    ltz = tzinfo.LocalTimezone(d)
    latest_updated = rfc3339_date(d.replace(tzinfo=ltz))
    self.assertEqual(updated, latest_updated)
Test that both the published and updated dates are
considered when determining the latest post date.
def test_latest_post_date(self):
    '\n        Test that both the published and updated dates are\n        considered when determining the latest post date.\n        '
    response = self.client.get('/syndication/atom/')
    feed = minidom.parseString(response.content).firstChild
    updated = feed.getElementsByTagName('updated')[0].firstChild.wholeText
    d = Entry.objects.latest('published').published
    ltz = tzinfo.LocalTimezone(d)
    latest_published = rfc3339_date(d.replace(tzinfo=ltz))
    self.assertEqual(updated, latest_published)
    response = self.client.get('/syndication/latest/')
    feed = minidom.parseString(response.content).firstChild
    updated = feed.getElementsByTagName('updated')[0].firstChild.wholeText
    d = Entry.objects.exclude(pk=5).latest('updated').updated
    ltz = tzinfo.LocalTimezone(d)
    latest_updated = rfc3339_date(d.replace(tzinfo=ltz))
    self.assertEqual(updated, latest_updated)