def test_not_authorized_warning(self, mock_log_warning): """ Ensure that expected authorization issues are logged as warnings. """ with mock_create_refund(status=403): refund_seat(self.course_enrollment, UserFactory()) self.assertTrue(mock_log_warning.called)