def test_getli(self): soup1 = crawli(EXAMPLE_URL) soup2 = BeautifulSoup(EXAMPLE_FILE) p1 = parseli(soup1) p2 = parseli(soup2) # urls removed since not a good indicator of match (/pub v. /in v. id) del p1['url'] del p2['url'] self.assertTrue(p1 == p2, "Expected results of parseli to be the same " \ "for realtime + test date but they weren't")
def test_parseli(self): soup = BeautifulSoup(EXAMPLE_FILE) jsn = parseli(soup) del jsn['url'] self.assertTrue(EXAMPLE_DATA == jsn, "Example data does not match the results of " \ "paresli on example file")