class Test_GetCrawlerImageLink(unittest.TestCase):
    """
    Check contents similarity
    """

    def setUp(self):
        self.wiki_pedia_image_link = WikiPediaImageLink()
        self.get_crawler_image_link = GetCrawlerImageLink()

    def test_get_like_search(self):
        test_word = "Zundert"
        answer_list = [
            'https://upload.wikimedia.org/wikipedia/commons/b/b5/Zundert-City_Hall.JPG',
        ]
        self.wiki_pedia_image_link.search_like(test_word)
        self.get_crawler_image_link.crawler(self.wiki_pedia_image_link.image_data_list[0])
        self.assertListEqual(self.get_crawler_image_link.image_link_list, answer_list)
class Test_WikiPediaImageLink(unittest.TestCase):
    """
    Check contents similarity
    """
    def setUp(self):
        self.wiki_pedia_image_link = WikiPediaImageLink()

    def test_get_like_search(self):
        test_word = "Zundert"
        answer_list = [
            'https://en.wikipedia.org/wiki/File:Zundert-City_Hall.JPG',
            'https://en.wikipedia.org/wiki/File:Zundert_church.JPG',
            'https://en.wikipedia.org/wiki/File:Zundert_gravestone_van_Gogh.JPG'
        ]
        self.wiki_pedia_image_link.search_like(test_word)
        self.assertListEqual(self.wiki_pedia_image_link.image_data_list,
                             answer_list)
class Test_WikiPediaImageLink(unittest.TestCase):
    """
    Check contents similarity
    """

    def setUp(self):
        self.wiki_pedia_image_link = WikiPediaImageLink()

    def test_get_like_search(self):
        test_word = "Zundert"
        answer_list = [
            'https://en.wikipedia.org/wiki/File:Zundert-City_Hall.JPG',
            'https://en.wikipedia.org/wiki/File:Zundert_church.JPG',
            'https://en.wikipedia.org/wiki/File:Zundert_gravestone_van_Gogh.JPG'
        ]
        self.wiki_pedia_image_link.search_like(test_word)
        self.assertListEqual(self.wiki_pedia_image_link.image_data_list, answer_list)
Exemple #4
0
class Test_GetCrawlerImageLink(unittest.TestCase):
    """
    Check contents similarity
    """
    def setUp(self):
        self.wiki_pedia_image_link = WikiPediaImageLink()
        self.get_crawler_image_link = GetCrawlerImageLink()

    def test_get_like_search(self):
        test_word = "Zundert"
        answer_list = [
            'https://upload.wikimedia.org/wikipedia/commons/b/b5/Zundert-City_Hall.JPG',
        ]
        self.wiki_pedia_image_link.search_like(test_word)
        self.get_crawler_image_link.crawler(
            self.wiki_pedia_image_link.image_data_list[0])
        self.assertListEqual(self.get_crawler_image_link.image_link_list,
                             answer_list)
 def setUp(self):
     self.wiki_pedia_image_link = WikiPediaImageLink()
Exemple #6
0
 def setUp(self):
     self.wiki_pedia_image_link = WikiPediaImageLink()
     self.get_crawler_image_link = GetCrawlerImageLink()
 def setUp(self):
     self.wiki_pedia_image_link = WikiPediaImageLink()
     self.get_crawler_image_link = GetCrawlerImageLink()
 def setUp(self):
     self.wiki_pedia_image_link = WikiPediaImageLink()