From 341ec8b6448228d18a1f14219365a3087573e8f4 Mon Sep 17 00:00:00 2001 From: sohailfatima <23100065@lums.edu.pk> Date: Mon, 14 Oct 2024 12:25:08 +0500 Subject: [PATCH] feat: updated logic to specify channel name --- .../course_goals/management/commands/goal_reminder_email.py | 2 +- .../management/commands/tests/test_goal_reminder_email.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py index 5446cea80590..abd1dc53755b 100644 --- a/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py +++ b/lms/djangoapps/course_goals/management/commands/goal_reminder_email.py @@ -94,7 +94,7 @@ def send_ace_message(goal): options = { 'transactional': True, 'from_address': settings.LMS_COMM_DEFAULT_FROM_EMAIL, - 'override_default_channel': is_ses_enabled, + 'override_default_channel': 'django_email', } msg = Message( diff --git a/lms/djangoapps/course_goals/management/commands/tests/test_goal_reminder_email.py b/lms/djangoapps/course_goals/management/commands/tests/test_goal_reminder_email.py index a0f75e9747dd..5b98b202d41f 100644 --- a/lms/djangoapps/course_goals/management/commands/tests/test_goal_reminder_email.py +++ b/lms/djangoapps/course_goals/management/commands/tests/test_goal_reminder_email.py @@ -195,7 +195,7 @@ def test_params_with_ses(self, mock_ace): assert mock_ace.call_count == 1 msg = mock_ace.call_args[0][0] - assert msg.options['override_default_channel'] is True + assert msg.options['override_default_channel'] == 'django_email' assert msg.options['from_address'] == settings.LMS_COMM_DEFAULT_FROM_EMAIL @mock.patch('lms.djangoapps.course_goals.management.commands.goal_reminder_email.ace.send')