'Test that pagination parameters are correctly plumbed through to the
comments service and that a 404 is correctly returned if a page past the
end is requested'

def test_pagination(self):

    self.register_get_user_response(self.user)
    cs_comment_child = self.make_comment_data(u'test_child_comment', self.comment_id, children=[])
    cs_comment = self.make_comment_data(self.comment_id, None, [cs_comment_child])
    cs_thread = make_minimal_cs_thread({u'id': self.thread_id, u'course_id': unicode(self.course.id), u'children': [cs_comment]})
    self.register_get_thread_response(cs_thread)
    self.register_get_comment_response(cs_comment)
    response = self.client.get(self.url, {u'comment_id': self.comment_id, u'page': u'18', u'page_size': u'4'})
    self.assert_response_correct(response, 404, {u'developer_message': u'Page    not    found    (No    results    on    this    page).'})
