def test_autodiscovery1(self):
     html_file = self.file_obj_from_path('AutoDiscovery1.htm')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {
         'SampleRss0.91Feed.xml': 'RSS',
         'SampleRss0.92Feed.rss': 'RSS',
     })
     feeds = parse_html(html_file, url='http://localhost/foo/bar')
     self.assertEqual(feeds['application/rss+xml'], {
         'http://localhost/foo/SampleRss0.91Feed.xml': 'RSS',
         'http://localhost/foo/SampleRss0.92Feed.rss': 'RSS',
     })
 def test_autodiscovery1(self):
     html_file = self.file_obj_from_path('AutoDiscovery1.htm')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {
         'SampleRss0.91Feed.xml': 'RSS',
         'SampleRss0.92Feed.rss': 'RSS',
     })
     feeds = parse_html(html_file, url='http://localhost/foo/bar')
     self.assertEqual(
         feeds['application/rss+xml'], {
             'http://localhost/foo/SampleRss0.91Feed.xml': 'RSS',
             'http://localhost/foo/SampleRss0.92Feed.rss': 'RSS',
         })
    def test_get_rss_autodiscovery_links(self):
        html_file = self.file_obj_from_path('GetRssAutoDiscoveryLinks.html')
        feeds = parse_html(html_file)
        rss20_url = '''\
http://127.0.0.1:8081/RssLocaterTestFiles/SampleRss2.0Feed.xml'''
        self.assertEqual(feeds['application/rss+xml'], {
            'SampleRss0.91Feed.xml': 'RSS',
            'SampleRss0.92Feed.rss': 'RSS',
            'SampleRss1.0Feed.rss': 'RSS',
            rss20_url: 'RSS',
        })
    def test_get_rss_autodiscovery_links(self):
        html_file = self.file_obj_from_path('GetRssAutoDiscoveryLinks.html')
        feeds = parse_html(html_file)
        rss20_url = '''\
http://127.0.0.1:8081/RssLocaterTestFiles/SampleRss2.0Feed.xml'''
        self.assertEqual(
            feeds['application/rss+xml'], {
                'SampleRss0.91Feed.xml': 'RSS',
                'SampleRss0.92Feed.rss': 'RSS',
                'SampleRss1.0Feed.rss': 'RSS',
                rss20_url: 'RSS',
            })
Beispiel #5
0
 def do_test_parse_minimal(self, html):
     feeds = cardisco.parse_html(MINIMAL_HTML)
     self.assertMinimalFeedsEqual(feeds)
 def test_page_with_fake_atom_link(self):
     html_file = self.file_obj_from_path('NoFeeds.html')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {})
     self.assertEqual(feeds['application/atom+xml'], {})
 def test_no_feeds(self):
     html_file = self.file_obj_from_path('NoFeeds.html')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {})
 def test_page_with_fake_atom_link(self):
     html_file = self.file_obj_from_path('NoFeeds.html')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {})
     self.assertEqual(feeds['application/atom+xml'], {})
 def test_no_feeds(self):
     html_file = self.file_obj_from_path('NoFeeds.html')
     feeds = parse_html(html_file)
     self.assertEqual(feeds['application/rss+xml'], {})
Beispiel #10
0
 def do_test_parse_minimal(self, html):
     feeds = cardisco.parse_html(MINIMAL_HTML)
     self.assertMinimalFeedsEqual(feeds)