Exemplo n.º 1
0
    def test_img_link_2(self):
        text = 'img src="http://l.yimg.com/uu/api/res/1.2/I4AtbbFWPM.66LesQWxLqQ--/YXBwaWQ9eXRhY2h5b247aD04Njt3PTEzM' \
               'Ds-/https://media.zenfs.com/en/the_new_york_times_articles_158/101bec76cc1717d8bfd63460b9443fd1" width=' \
               '"130" height="86" alt="She Texted About Dinner While Driving. Then a Pedestrian Was Dead." align="left" ' \
               'title="She Texted About Dinner While Driving. Then a Pedestrian Was Dead." border="0" ></a>FREEHOLD, N.J.' \
               ' -- One woman was out for a walk and a taste of fresh air during a break from her job as a scientist at' \
               ' a New Jersey fragrance manufacturer. She and her husband had been trying to get pregnant, and brief' \
               ' bouts of exercise, away from the laboratory&#39;s smells and fumes, were part of that plan.A second ' \
               'woman was behind the wheel of a black Mercedes-Benz, headed to work as chief executive of a nonprofit in '
        img_link = 'l.yimg.com/uu/api/res/1.2/I4AtbbFWPM.66LesQWxLqQ--/YXBwaWQ9eXRhY2h5b247aD04Njt3PTEzM' \
                   'Ds-/https://media.zenfs.com/en/the_new_york_times_articles_158/101bec76cc1717d8bfd63460b9443fd1'
        hand = Handler("https://news.yahoo.com/rss/", 3)

        self.assertNotEqual(hand.get_img_links(text)[0], img_link)