def METHOD_NAME(self, enrollment_mode, is_requirement_displayed):
    """Test the progress table is only displayed to the verified and credit students."""
    self.enrollment.mode = enrollment_mode
    self.enrollment.save()
    response = self._get_progress_page()
    # Verify the requirements are shown only if the user is in a credit-eligible mode.
    classes = ('credit-eligibility', 'eligibility-heading')
    method = self.assertContains if is_requirement_displayed else self.assertNotContains
    for _class in classes:
        method(response, _class)