'Change an enrollment\'s activation and verify its activation and mode are as expected.'

def assert_enrollment_activation(self, expected_activation, expected_mode):

    self.assert_enrollment_status(as_server=True, mode=expected_mode, is_active=expected_activation, expected_status=status.HTTP_200_OK)
    (actual_mode, actual_activation) = CourseEnrollment.enrollment_mode_for_user(self.user, self.course.id)
    self.assertEqual(actual_activation, expected_activation)
    self.assertEqual(actual_mode, expected_mode)
