Python django.utils.feedgenerator.Atom1Feed() Examples
The following are 5
code examples of django.utils.feedgenerator.Atom1Feed().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
django.utils.feedgenerator
, or try the search function
.
Example #1
Source File: test_feedgenerator.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_atom1_mime_type(self): """ Atom MIME type has UTF8 Charset parameter set """ atom_feed = feedgenerator.Atom1Feed("title", "link", "description") self.assertEqual( atom_feed.content_type, "application/atom+xml; charset=utf-8" )
Example #2
Source File: test_feedgenerator.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_atom_add_item(self): # Not providing any optional arguments to Atom1Feed.add_item() feed = feedgenerator.Atom1Feed('title', '/link/', 'descr') feed.add_item('item_title', 'item_link', 'item_description') feed.writeString('utf-8')
Example #3
Source File: test_feedgenerator.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_deterministic_attribute_order(self): feed = feedgenerator.Atom1Feed('title', '/link/', 'desc') feed_content = feed.writeString('utf-8') self.assertIn('href="/link/" rel="alternate"', feed_content)
Example #4
Source File: test_feedgenerator.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_atom1_mime_type(self): """ Atom MIME type has UTF8 Charset parameter set """ atom_feed = feedgenerator.Atom1Feed("title", "link", "description") self.assertEqual( atom_feed.content_type, "application/atom+xml; charset=utf-8" )
Example #5
Source File: test_feedgenerator.py From djongo with GNU Affero General Public License v3.0 | 5 votes |
def test_atom_add_item(self): # Not providing any optional arguments to Atom1Feed.add_item() feed = feedgenerator.Atom1Feed('title', '/link/', 'descr') feed.add_item('item_title', 'item_link', 'item_description') feed.writeString('utf-8')