def assert_update_enrollment(self, search_string_type, new_mode):
        """ Dry method to update the enrollment and assert response."""
        self.assertIsNone(ManualEnrollmentAudit.get_manual_enrollment_by_email(self.student.email))
        url = reverse(
            'support:enrollment_list',
            kwargs={'username_or_email': getattr(self.student, search_string_type)}
        )
        response = self.client.post(url, data={
            'course_id': unicode(self.course.id),  # pylint: disable=no-member
            'old_mode': CourseMode.AUDIT,
            'new_mode': new_mode,
            'reason': 'Financial Assistance'
        })
        # Enrollment cannot be changed to credit mode.
        if new_mode == CourseMode.CREDIT_MODE:
            self.assertEqual(response.status_code, 400)
        else:
            self.assertEqual(response.status_code, 200)
            self.assertIsNotNone(ManualEnrollmentAudit.get_manual_enrollment_by_email(self.student.email))
            self.assert_enrollment(new_mode)