'Verifies the response when the courseware index page is accessed with
the given chapter and section names.'

def _verify_index_response(self, expected_response_code=200, chapter_name=None, section_name=None):

    url = reverse('courseware_section', kwargs={'course_id': unicode(self.course_key), 'chapter': (unicode(self.chapter.location.name) if (chapter_name is None) else chapter_name), 'section': (unicode(self.section2.location.name) if (section_name is None) else section_name)})
    response = self.client.get(url)
    self.assertEqual(response.status_code, expected_response_code)
    return response
