Kaydet (Commit) a4b80e24 authored tarafından Unai Zalakain's avatar Unai Zalakain

Refs #13110 -- Fixed mistakes in the new multiple enclosure feed tests

üst 1a09b3c3
......@@ -427,7 +427,7 @@ class Atom1Feed(SyndicationFeed):
handler.addQuickElement("summary", item['description'], {"type": "html"})
# Enclosures.
for enclosure in item.get('enclosures') or []:
for enclosure in item['enclosures']:
handler.addQuickElement('link', '', {
'rel': 'enclosure',
'href': enclosure.url,
......
......@@ -208,6 +208,6 @@ class TestMultipleEnclosureAtomFeed(TestAtomFeed):
"""
def item_enclosures(self, item):
return [
feedgenerator.Enclosure('http://example.com/hello.png', 0, 'image/png'),
feedgenerator.Enclosure('http://example.com/goodbye.png', 0, 'image/png'),
feedgenerator.Enclosure('http://example.com/hello.png', '0', 'image/png'),
feedgenerator.Enclosure('http://example.com/goodbye.png', '0', 'image/png'),
]
......@@ -300,7 +300,7 @@ class SyndicationFeedTest(FeedTestCase):
self.assertNotEqual(published, updated)
def test_atom_single_enclosure(self):
response = self.client.get('/syndication/rss2/single-enclosure/')
response = self.client.get('/syndication/atom/single-enclosure/')
feed = minidom.parseString(response.content).firstChild
items = feed.getElementsByTagName('entry')
for item in items:
......@@ -309,7 +309,7 @@ class SyndicationFeedTest(FeedTestCase):
self.assertEqual(len(links), 1)
def test_atom_multiple_enclosures(self):
response = self.client.get('/syndication/rss2/single-enclosure/')
response = self.client.get('/syndication/atom/multiple-enclosure/')
feed = minidom.parseString(response.content).firstChild
items = feed.getElementsByTagName('entry')
for item in items:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment