'Ensure that the index page displays the archived courses as expected.'

def check_index_page(self, separate_archived_courses, org):

    index_url = '/home/'
    index_params = {}
    if (org is not None):
        index_params['org'] = org
    index_response = self.client.get(index_url, index_params, HTTP_ACCEPT='text/html')
    self.assertEquals(index_response.status_code, 200)
    parsed_html = lxml.html.fromstring(index_response.content)
    course_tab = parsed_html.find_class('courses')
    self.assertEqual(len(course_tab), 1)
    archived_course_tab = parsed_html.find_class('archived-courses')
    self.assertEqual(len(archived_course_tab), (1 if separate_archived_courses else 0))
