Exemple #1
0
class CommentsTest(unittest.TestCase):
    def setUp(self):
        self.youku = YoukuComments(CLIENT_ID)

    def test(self):
        comm = self.youku.find_comments_by_video(VIDEO_ID)
        self.assertIsNotNone(comm['total'])

        comm1 = self.youku.find_comment_by_id(comm['comments'][0]['id'])
        self.assertIsNotNone(comm1)

        comm2 = self.youku.find_comments_by_ids(comm1['id'])
        self.assertEqual(comm2['total'], 1)

        hot_comm = self.youku.find_hot_comments_by_video(VIDEO_ID)
        self.assertIsNotNone(hot_comm)

        comm_by_me = self.youku.find_comments_by_me(ACCESS_TOKEN)
        self.assertIsNotNone(comm_by_me)
Exemple #2
0
 def setUp(self):
     self.youku = YoukuComments(CLIENT_ID)