'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)
    self.register_get_thread_response(make_minimal_cs_thread({u'id': self.thread_id, u'course_id': unicode(self.course.id), u'thread_type': u'discussion', u'resp_total': 10}))
    response = self.client.get(self.url, {u'thread_id': self.thread_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).'})
    self.assert_query_params_equal(httpretty.httpretty.latest_requests[(-2)], {u'resp_skip': [u'68'], u'resp_limit': [u'4'], u'user_id': [str(self.user.id)], u'mark_as_read': [u'False'], u'recursive': [u'False'], u'with_responses': [u'True']})
