'Verifies the response depending on ALLOW_ACCESS_TO_MILESTONE_COURSE
Since different endpoints will have different behaviours towards milestones,
setting ALLOW_ACCESS_TO_MILESTONE_COURSE (default is False) to True, will
not return a 404. For example, when getting a list of courses a user is
enrolled in, although a user may have unfulfilled milestones, the course
should still show up in the course enrollments list.'

def _verify_unfulfilled_milestone_response(self):

    if self.ALLOW_ACCESS_TO_MILESTONE_COURSE:
        self.api_response()
    else:
        response = self.api_response(expected_response_code=404)
        self.assertEqual(response.data, MilestoneAccessError().to_json())
