@@ -0,0 +1,1056 @@
+from unittest import TestCase%0A%0Aimport mock%0A%0Afrom unicore.comments.client.tests import fixtures as f%0Afrom unicore.comments.client import CommentPage, CommentClient, Comment%0A%0A%0Aclass CommentPageTestCase(TestCase):%0A%0A    def setUp(self):%0A        self.client = mock.Mock(spec=CommentClient)%0A        self.page = CommentPage(self.client, f.comment_stream_data)%0A%0A    def test_properties(self):%0A        self.assertEqual(self.page.offset, f.comment_stream_data%5B'offset'%5D)%0A        self.assertEqual(self.page.limit, f.comment_stream_data%5B'limit'%5D)%0A        self.assertEqual(self.page.after, f.comment_stream_data%5B'after'%5D)%0A        self.assertEqual(self.page.metadata, f.comment_stream_data%5B'metadata'%5D)%0A        self.assertEqual(%0A            self.page.state, f.comment_stream_data%5B'metadata'%5D%5B'state'%5D)%0A%0A    def test_iterable(self):%0A        length = len(self.page)%0A        self.assertEqual(length, f.comment_stream_data%5B'count'%5D)%0A%0A        for i, comment in enumerate(self.page):%0A            self.assertIsInstance(comment, Comment)%0A        self.assertEqual(i, length - 1)%0A

test comment page class