'Unit Test: entrance exam requirement message should be present in response
and percentage of required score should be rounded as expected'

def test_entrance_exam_requirement_message_with_correct_percentage(self):

    minimum_score_pct = 29
    self.course.entrance_exam_minimum_score_pct = (float(minimum_score_pct) / 100)
    modulestore().update_item(self.course, self.request.user.id)
    answer_entrance_exam_problem(self.course, self.request, self.problem_1, value=1, max_value=5)
    url = reverse('courseware_section', kwargs={'course_id': unicode(self.course.id), 'chapter': self.entrance_exam.location.name, 'section': self.exam_1.location.name})
    resp = self.client.get(url)
    self.assertEqual(resp.status_code, 200)
    self.assertIn('To    access    course    materials,    you    must    score    {}%    or    higher'.format(minimum_score_pct), resp.content)
    self.assertIn('Your    current    score    is    20%.', resp.content)
