def test_send_refund_notification(self): """ Verify the support team is notified of the refund request. """ with mock.patch('commerce.signals.create_zendesk_ticket') as mock_zendesk: refund_ids = [1, 2, 3] send_refund_notification(self.course_enrollment, refund_ids) body = generate_refund_notification_body(self.student, refund_ids) mock_zendesk.assert_called_with(self.student.profile.name, self.student.email, "[Refund] User-Requested Refund", body, ['auto_refund'])
def test_send_refund_notification(self, student_email, mock_zendesk): """ Verify the support team is notified of the refund request. """ refund_ids = [1, 2, 3] # pass a student with unicode and ascii email to ensure that # generate_refund_notification_body can handle formatting a unicode # message self.student.email = student_email send_refund_notification(self.course_enrollment, refund_ids) body = generate_refund_notification_body(self.student, refund_ids) mock_zendesk.assert_called_with(self.student.profile.name, self.student.email, "[Refund] User-Requested Refund", body, ['auto_refund'])
def test_send_refund_notification(self, student_email, mock_zendesk): """ Verify the support team is notified of the refund request. """ refund_ids = [1, 2, 3] # pass a student with unicode and ascii email to ensure that # generate_refund_notification_body can handle formatting a unicode # message self.student.email = student_email send_refund_notification(self.course_enrollment, refund_ids) body = generate_refund_notification_body(self.student, refund_ids) mock_zendesk.assert_called_with( self.student.profile.name, self.student.email, "[Refund] User-Requested Refund", body, ['auto_refund'] )