Ticket #15237: django_15237.diff

File django_15237.diff, 1.1 KB (added by Jason Kotenko, 14 years ago)

SVN diff

  • django/utils/feedgenerator.py

     
    287287
    288288class Atom1Feed(SyndicationFeed):
    289289    # Spec: http://atompub.org/2005/07/11/draft-ietf-atompub-format-10.html
    290     mime_type = 'application/atom+xml'
     290    mime_type = 'application/atom+xml; charset=utf8'
    291291    ns = u"http://www.w3.org/2005/Atom"
    292292
    293293    def write(self, outfile, encoding):
  • tests/regressiontests/utils/feedgenerator.py

     
    6060            "2008-11-14T13:37:00+02:00"
    6161        )
    6262
     63    def test_atom1_mime_type(self):
     64        """
     65        Test to make sure Atom MIME type has UTF8 Charset parameter set
     66        """
     67        atom_feed = feedgenerator.Atom1Feed("title", "link", "description")
     68        self.assertEqual(
     69            atom_feed.mime_type, "application/atom+xml; charset=utf8"
     70        )
     71
Back to Top