'Unit Test: test_contentstore_views_entrance_exam_post'

def test_contentstore_views_entrance_exam_post(self):

    resp = self.client.post(self.exam_url, {}, http_accept='application/json')
    self.assertEqual(resp.status_code, 201)
    resp = self.client.get(self.exam_url)
    self.assertEqual(resp.status_code, 200)
    self.course = modulestore().get_course(self.course.id)
    metadata = CourseMetadata.fetch_all(self.course)
    self.assertTrue(metadata['entrance_exam_enabled'])
    self.assertIsNotNone(metadata['entrance_exam_minimum_score_pct'])
    self.assertIsNotNone(metadata['entrance_exam_id']['value'])
    self.assertTrue(len(milestones_helpers.get_course_milestones(unicode(self.course.id))))
    content_milestones = milestones_helpers.get_course_content_milestones(unicode(self.course.id), metadata['entrance_exam_id']['value'], self.milestone_relationship_types['FULFILLS'])
    self.assertTrue(len(content_milestones))
