示例#1
0
文件: tests.py 项目: dudarev/giffeed
    def test_url_parsing_duplicates(self):
        """
        Tests that gif links are parsed correctly without duplicates.
        """

        b = Bot(name="_test", url="http://example.com")
        links = b.parse_url(file_name="giffeed/bots/test_data/gif_parsing.txt")
        self.assertEqual(len(links), 4)
示例#2
0
文件: tests.py 项目: n-zav/giffeed
    def test_url_parsing_duplicates(self):
        """
        Tests that gif links are parsed correctly without duplicates.
        """

        b = Bot(name='_test', url='http://example.com')
        links = b.parse_url(file_name='giffeed/bots/test_data/gif_parsing.txt')
        self.assertEqual(len(links), 4)
示例#3
0
文件: tests.py 项目: dudarev/giffeed
    def test_url_parsing_ignore(self):
        """
        Tests that for source 'topsy' all links that have topsy are ignored.
        """

        b = Bot(name="_test", url="http://example.com", source="topsy")
        links = b.parse_url(file_name="giffeed/bots/test_data/gif_parsing.txt")
        for l in links:
            self.assertFalse("topsy" in l)
示例#4
0
文件: tests.py 项目: n-zav/giffeed
    def test_url_parsing_ignore(self):
        """
        Tests that for source 'topsy' all links that have topsy are ignored.
        """

        b = Bot(name='_test', url='http://example.com', source='topsy')
        links = b.parse_url(file_name='giffeed/bots/test_data/gif_parsing.txt')
        for l in links:
            self.assertFalse('topsy' in l)