'Unit Test: If entrance exam is not enabled then page should be redirected with chapter contents.'

@patch.dict('django.conf.settings.FEATURES', {'ENTRANCE_EXAMS': False})
def test_entrance_exam_content_absence(self):

    url = reverse('courseware', kwargs={'course_id': unicode(self.course.id)})
    expected_url = reverse('courseware_section', kwargs={'course_id': unicode(self.course.id), 'chapter': self.chapter.location.name, 'section': self.welcome.location.name})
    resp = self.client.get(url)
    self.assertRedirects(resp, expected_url, status_code=302, target_status_code=200)
    resp = self.client.get(expected_url)
    self.assertNotIn('Exam    Vertical    -    Unit    1', resp.content)
