'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(('last_activity_at', 'activity'), ('comment_count', 'comments'), ('vote_count', 'votes'))
@ddt.unpack
def test_order_by_query(self, http_query, cc_query):

    self.register_get_threads_response([], page=1, num_pages=0)
    result = get_thread_list(self.request, self.course.id, page=1, page_size=11, order_by=http_query).data
    expected_result = make_paginated_api_response(results=[], count=0, num_pages=0, next_link=None, previous_link=None)
    expected_result.update({'text_search_rewrite': None})
    self.assertEqual(result, expected_result)
    self.assertEqual(urlparse(httpretty.last_request().path).path, '/api/v1/threads')
    self.assert_last_query_params({'user_id': [unicode(self.user.id)], 'course_id': [unicode(self.course.id)], 'sort_key': [cc_query], 'page': ['1'], 'per_page': ['11']})
