Exemple #1
0
 def test_eps_from_html(self):
     eps = BangumiEpisode.eps_from_html(self._ep_html)
     self.assertEqual(31, len(eps))
     for ep, ep_id, ep_num, ep_type in zip(eps, self._ep_ids,
                                           self._ep_nums, self._ep_types):
         self.assertEqual(ep_id, ep.id_)
         self.assertEqual(ep_num, ep.ep_num)
         self.assertEqual(ep_type, ep.ep_type)
Exemple #2
0
 def test_eps_from_html(self):
     eps = BangumiEpisode.eps_from_html(self._ep_html)
     self.assertEqual(31, len(eps))
     for ep, ep_id, ep_num, ep_type in zip(eps, self._ep_ids, self._ep_nums,
                                           self._ep_types):
         self.assertEqual(ep_id, ep.id_)
         self.assertEqual(ep_num, ep.ep_num)
         self.assertEqual(ep_type, ep.ep_type)
Exemple #3
0
 def test_from_to_json(self):
     eps = BangumiEpisode.eps_from_html(self._ep_html)
     ep_jsons = [ep.to_json() for ep in eps]
     eps_new = [BangumiEpisode.from_json(ep_json) for ep_json in ep_jsons]
     for ep, ep_new in zip(eps, eps_new):
         self.assertEqual(ep, ep_new)
Exemple #4
0
 def test_from_to_json(self):
     eps = BangumiEpisode.eps_from_html(self._ep_html)
     ep_jsons = [ep.to_json() for ep in eps]
     eps_new = [BangumiEpisode.from_json(ep_json) for ep_json in ep_jsons]
     for ep, ep_new in zip(eps, eps_new):
         self.assertEqual(ep, ep_new)