'Tests the order_by parameter
Arguments:
http_query (str): Query string sent in the http request
cc_query (str): Query string used for the comments client service'

@ddt.data((u'last_activity_at', u'activity'), (u'comment_count', u'comments'), (u'vote_count', u'votes'))
@ddt.unpack
def test_order_by(self, http_query, cc_query):

    threads = [make_minimal_cs_thread()]
    self.register_get_user_response(self.user)
    self.register_get_threads_response(threads, page=1, num_pages=1)
    self.client.get(self.url, {u'course_id': unicode(self.course.id), u'order_by': http_query})
    self.assert_last_query_params({u'user_id': [unicode(self.user.id)], u'course_id': [unicode(self.course.id)], u'page': [u'1'], u'per_page': [u'10'], u'sort_key': [cc_query]})
