diff --git a/eox_nelp/signals/receivers.py b/eox_nelp/signals/receivers.py index 0b41f7e6..5bbaf98c 100644 --- a/eox_nelp/signals/receivers.py +++ b/eox_nelp/signals/receivers.py @@ -406,7 +406,7 @@ def pearson_vue_course_completion_handler(instance, **kwargs): # pylint: disabl ) if getattr(settings, "USE_PEARSON_ENGINE_SERVICE", False): - if not getattr(settings, "PEARSON_RTI_COURSES_DATA", {}).get(str(instance.context_key)): + if not getattr(settings, "PEARSON_ENGINE_COURSES_ENABLED", {}).get(str(instance.context_key)): return real_time_import_task_v2.delay( user_id=instance.user_id, @@ -441,7 +441,7 @@ def pearson_vue_course_passed_handler(user, course_id, **kwargs): # pylint: dis ) if getattr(settings, "USE_PEARSON_ENGINE_SERVICE", False): - if not getattr(settings, "PEARSON_RTI_COURSES_DATA", {}).get(str(course_id)): + if not getattr(settings, "PEARSON_ENGINE_COURSES_ENABLED", {}).get(str(course_id)): return real_time_import_task_v2.delay( user_id=user.id, diff --git a/eox_nelp/signals/tests/test_receivers.py b/eox_nelp/signals/tests/test_receivers.py index 449b53d3..574d93c4 100644 --- a/eox_nelp/signals/tests/test_receivers.py +++ b/eox_nelp/signals/tests/test_receivers.py @@ -769,10 +769,7 @@ def test_invalid_course_state(self, invalid_state, task_mock, get_completed_and_ task_mock.delay.assert_not_called() - @override_settings( - PEARSON_RTI_ACTIVATE_COMPLETION_GATE=True, - PEARSON_RTI_COURSES_DATA=course_exam_configuration, - ) + @override_settings(PEARSON_RTI_ACTIVATE_COMPLETION_GATE=True, PEARSON_RTI_COURSES_DATA=course_exam_configuration,) @patch("eox_nelp.signals.receivers.get_completed_and_graded") @patch("eox_nelp.signals.receivers.real_time_import_task") def test_call_async_task(self, task_mock, get_completed_and_graded_mock): @@ -796,7 +793,7 @@ def test_call_async_task(self, task_mock, get_completed_and_graded_mock): @override_settings( PEARSON_RTI_ACTIVATE_COMPLETION_GATE=True, USE_PEARSON_ENGINE_SERVICE=True, - PEARSON_RTI_COURSES_DATA=course_exam_configuration, + PEARSON_ENGINE_COURSES_ENABLED=course_exam_configuration, ) @patch("eox_nelp.signals.receivers.get_completed_and_graded") @patch("eox_nelp.signals.receivers.real_time_import_task_v2") @@ -858,10 +855,7 @@ def test_invalid_course_configuration(self, wrong_course_config, task_mock): task_mock.delay.assert_not_called() - @override_settings( - PEARSON_RTI_ACTIVATE_GRADED_GATE=True, - PEARSON_RTI_COURSES_DATA=course_exam_configuration, - ) + @override_settings(PEARSON_RTI_ACTIVATE_GRADED_GATE=True, PEARSON_RTI_COURSES_DATA=course_exam_configuration,) @patch("eox_nelp.signals.receivers.real_time_import_task") def test_call_async_task(self, task_mock): """Test that the async task is called with the right parameters @@ -881,7 +875,7 @@ def test_call_async_task(self, task_mock): @override_settings( PEARSON_RTI_ACTIVATE_GRADED_GATE=True, USE_PEARSON_ENGINE_SERVICE=True, - PEARSON_RTI_COURSES_DATA=course_exam_configuration, + PEARSON_ENGINE_COURSES_ENABLED=course_exam_configuration, ) @patch("eox_nelp.signals.receivers.real_time_import_task_v2") def test_call_async_task_v2(self, task_mock):