def test_media_description(self): """ 'media_description' should be tried as a fallback if 'description' isn't available. """ entry = { 'title': 'title', 'media_description': 'description', 'enclosures': [{'href': 'http://www.getmiro.com/video.flv'}]} i = Item.from_feedparser_entry(entry) self.assertEquals(i.description, 'description')
def test_do_not_require_enclosure_type(self): """ Enclosures should not require a 'type' attribute. """ entry = {'title': 'title', 'description': 'description', 'enclosures': [{'href': 'http://www.getmiro.com/video.flv'}]} i = Item.from_feedparser_entry(entry) self.assertEquals(i.name, 'title') self.assertEquals(i.description, 'description') self.assertEquals(i.url, 'http://www.getmiro.com/video.flv') self.assertEquals(i.mime_type, 'video/unknown')
def test_media_description(self): """ 'media_description' should be tried as a fallback if 'description' isn't available. """ entry = { 'title': 'title', 'media_description': 'description', 'enclosures': [{ 'href': 'http://www.getmiro.com/video.flv' }] } i = Item.from_feedparser_entry(entry) self.assertEquals(i.description, 'description')
def test_do_not_require_enclosure_type(self): """ Enclosures should not require a 'type' attribute. """ entry = { 'title': 'title', 'description': 'description', 'enclosures': [{ 'href': 'http://www.getmiro.com/video.flv' }] } i = Item.from_feedparser_entry(entry) self.assertEquals(i.name, 'title') self.assertEquals(i.description, 'description') self.assertEquals(i.url, 'http://www.getmiro.com/video.flv') self.assertEquals(i.mime_type, 'video/unknown')