From 6e947f61dcf4dedfb1b86af2d7b29d37c811f99a Mon Sep 17 00:00:00 2001 From: Muhammad Arslan Date: Tue, 26 Nov 2024 15:33:42 +0500 Subject: [PATCH 1/4] chore: Bump openedx-learning to version 0.18.1 --- requirements/constraints.txt | 2 +- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 21dc4cb0f88..56343eca2c3 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -135,7 +135,7 @@ optimizely-sdk<5.0 # Date: 2023-09-18 # pinning this version to avoid updates while the library is being developed # Issue for unpinning: https://github.com/openedx/edx-platform/issues/35269 -openedx-learning==0.18.0 +openedx-learning==0.18.1 # Date: 2023-11-29 # Open AI version 1.0.0 dropped support for openai.ChatCompletion which is currently in use in enterprise. diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index c697f8eb81f..ed6de126944 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -827,7 +827,7 @@ openedx-filters==1.11.0 # -r requirements/edx/kernel.in # lti-consumer-xblock # ora2 -openedx-learning==0.18.0 +openedx-learning==0.18.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index a07b24914d2..4e5e4fc6801 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -1386,7 +1386,7 @@ openedx-filters==1.11.0 # -r requirements/edx/testing.txt # lti-consumer-xblock # ora2 -openedx-learning==0.18.0 +openedx-learning==0.18.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/doc.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index fb3d610ded6..946e31c433d 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -997,7 +997,7 @@ openedx-filters==1.11.0 # -r requirements/edx/base.txt # lti-consumer-xblock # ora2 -openedx-learning==0.18.0 +openedx-learning==0.18.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index 6984a56265d..3bdd5c6e6f2 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -1042,7 +1042,7 @@ openedx-filters==1.11.0 # -r requirements/edx/base.txt # lti-consumer-xblock # ora2 -openedx-learning==0.18.0 +openedx-learning==0.18.1 # via # -c requirements/edx/../constraints.txt # -r requirements/edx/base.txt From e01c53177d9195dd92c716df64f388c209de4d4a Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:44:52 +0000 Subject: [PATCH 2/4] chore(deps): update dependency selenium-webdriver to v4.27.0 (#35930) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 18 ++++++++++++++---- package.json | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc1b643deaf..1a80bd34ff1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -101,7 +101,7 @@ "karma-webpack": "^5.0.1", "plato": "1.7.0", "react-test-renderer": "16.14.0", - "selenium-webdriver": "4.26.0", + "selenium-webdriver": "4.27.0", "sinon": "19.0.2", "squirejs": "0.1.0", "string-replace-loader": "^3.1.0", @@ -23129,10 +23129,20 @@ "integrity": "sha512-qGVDoreyYiP1pkQnbnFAUIS5AjenNwwQBdl7zeos9etl+hYKWahjRTfzAZZYBv5xNHx7vNKCmaLDQZ6Fr2AEXg==" }, "node_modules/selenium-webdriver": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.26.0.tgz", - "integrity": "sha512-nA7jMRIPV17mJmAiTDBWN96Sy0Uxrz5CCLb7bLVV6PpL417SyBMPc2Zo/uoREc2EOHlzHwHwAlFtgmSngSY4WQ==", + "version": "4.27.0", + "resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.27.0.tgz", + "integrity": "sha512-LkTJrNz5socxpPnWPODQ2bQ65eYx9JK+DQMYNihpTjMCqHwgWGYQnQTCAAche2W3ZP87alA+1zYPvgS8tHNzMQ==", "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/SeleniumHQ" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/selenium" + } + ], "license": "Apache-2.0", "dependencies": { "@bazel/runfiles": "^6.3.1", diff --git a/package.json b/package.json index a7e7c32bbf8..5b266b652f9 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "karma-webpack": "^5.0.1", "plato": "1.7.0", "react-test-renderer": "16.14.0", - "selenium-webdriver": "4.26.0", + "selenium-webdriver": "4.27.0", "sinon": "19.0.2", "squirejs": "0.1.0", "string-replace-loader": "^3.1.0", From 0b3d05dda65ff5f1647edf98e62ea7f41fc0a8b3 Mon Sep 17 00:00:00 2001 From: Ahtisham Shahid Date: Wed, 27 Nov 2024 18:28:07 +0500 Subject: [PATCH 3/4] chore: removed new comment notification grouping (#35920) --- lms/djangoapps/discussion/rest_api/discussions_notifications.py | 1 - lms/djangoapps/discussion/rest_api/tests/test_tasks.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/lms/djangoapps/discussion/rest_api/discussions_notifications.py b/lms/djangoapps/discussion/rest_api/discussions_notifications.py index 929e9917a54..88c7fea558c 100644 --- a/lms/djangoapps/discussion/rest_api/discussions_notifications.py +++ b/lms/djangoapps/discussion/rest_api/discussions_notifications.py @@ -155,7 +155,6 @@ def send_new_comment_notification(self): "author_name": str(author_name), "author_pronoun": str(author_pronoun), "email_content": clean_thread_html_body(self.comment.body), - "group_by_id": self.parent_response.id } self._send_notification([self.thread.user_id], "new_comment", extra_context=context) diff --git a/lms/djangoapps/discussion/rest_api/tests/test_tasks.py b/lms/djangoapps/discussion/rest_api/tests/test_tasks.py index 3a9eac32458..ddfc120a8e4 100644 --- a/lms/djangoapps/discussion/rest_api/tests/test_tasks.py +++ b/lms/djangoapps/discussion/rest_api/tests/test_tasks.py @@ -362,7 +362,6 @@ def test_send_notification_to_parent_threads(self): 'replier_name': self.user_3.username, 'post_title': self.thread.title, 'email_content': self.comment.body, - 'group_by_id': self.thread_2.id, 'author_name': 'dummy\'s', 'author_pronoun': 'dummy\'s', 'course_name': self.course.display_name, @@ -439,7 +438,6 @@ def test_comment_creators_own_response(self): expected_context = { 'replier_name': self.user_3.username, 'post_title': self.thread.title, - 'group_by_id': self.thread_2.id, 'author_name': 'dummy\'s', 'author_pronoun': 'your', 'course_name': self.course.display_name, From fba2defcf348b83638534f0dec6e2b4ea56d420c Mon Sep 17 00:00:00 2001 From: Kira Miller Date: Wed, 27 Nov 2024 20:32:45 +0000 Subject: [PATCH 4/4] fix: more test fixes --- .../user_api/accounts/tests/test_settings_views.py | 5 ++++- openedx/core/djangoapps/user_authn/views/tests/test_login.py | 2 ++ .../course_experience/tests/views/test_course_updates.py | 2 ++ openedx/features/enterprise_support/tests/test_api.py | 1 - 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py index badee6e8755..ffe553c8243 100644 --- a/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py +++ b/openedx/core/djangoapps/user_api/accounts/tests/test_settings_views.py @@ -61,12 +61,13 @@ def setUp(self): # pylint: disable=arguments-differ self.configure_google_provider(enabled=True, visible=True) self.configure_facebook_provider(enabled=True, visible=True) - # Python-social saves auth failure notifcations in Django messages. + # Python-social saves auth failure notifications in Django messages. # See pipeline.get_duplicate_provider() for details. self.request.COOKIES = {} MessageMiddleware(get_response=lambda request: None).process_request(self.request) messages.error(self.request, 'Facebook is already in use.', extra_tags='Auth facebook') + @mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_ENTERPRISE_INTEGRATION": False}) @mock.patch('openedx.features.enterprise_support.api.enterprise_customer_for_request') def test_context(self, mock_enterprise_customer_for_request): self.request.site = SiteFactory.create() @@ -109,6 +110,7 @@ def test_context(self, mock_enterprise_customer_for_request): expected_beta_language = {'code': 'lt-lt', 'name': settings.LANGUAGE_DICT.get('lt-lt')} assert context['beta_language'] == expected_beta_language + @mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_ENTERPRISE_INTEGRATION": False}) @with_site_configuration( configuration={ 'extended_profile_fields': ['work_experience'] @@ -124,6 +126,7 @@ def test_context_extended_profile(self): assert extended_pofile_field['field_name'] == 'work_experience' assert extended_pofile_field['field_label'] == 'Work experience' + @mock.patch.dict("django.conf.settings.FEATURES", {"ENABLE_ENTERPRISE_INTEGRATION": False}) @mock.patch('openedx.core.djangoapps.user_api.accounts.settings_views.enterprise_customer_for_request') @mock.patch('openedx.features.enterprise_support.utils.third_party_auth.provider.Registry.get') def test_context_for_enterprise_learner( diff --git a/openedx/core/djangoapps/user_authn/views/tests/test_login.py b/openedx/core/djangoapps/user_authn/views/tests/test_login.py index 1e8a4c3ed51..e139d3b4c5d 100644 --- a/openedx/core/djangoapps/user_authn/views/tests/test_login.py +++ b/openedx/core/djangoapps/user_authn/views/tests/test_login.py @@ -100,6 +100,8 @@ def test_login_success(self): FEATURES_WITH_AUTHN_MFE_ENABLED = settings.FEATURES.copy() FEATURES_WITH_AUTHN_MFE_ENABLED['ENABLE_AUTHN_MICROFRONTEND'] = True + FEATURES_WITH_AUTHN_MFE_ENABLED['ENABLE_ENTERPRISE_INTEGRATION'] = False + @override_settings(MARKETING_EMAILS_OPT_IN=True) def test_login_success_with_opt_in_flag_enabled(self): diff --git a/openedx/features/course_experience/tests/views/test_course_updates.py b/openedx/features/course_experience/tests/views/test_course_updates.py index 379be52ed40..9cee3246ae7 100644 --- a/openedx/features/course_experience/tests/views/test_course_updates.py +++ b/openedx/features/course_experience/tests/views/test_course_updates.py @@ -6,6 +6,7 @@ from django.urls import reverse from pytz import UTC +from unittest.mock import patch from openedx.core.djangoapps.waffle_utils.testutils import WAFFLE_TABLES from openedx.features.content_type_gating.models import ContentTypeGatingConfig @@ -40,6 +41,7 @@ def test_view(self): self.assertContains(response, 'First Message') self.assertContains(response, 'Second Message') + @patch.dict("django.conf.settings.FEATURES", {"ENABLE_ENTERPRISE_INTEGRATION": False}) def test_queries(self): ContentTypeGatingConfig.objects.create(enabled=True, enabled_as_of=datetime(2018, 1, 1, tzinfo=UTC)) self.create_course_update('First Message') diff --git a/openedx/features/enterprise_support/tests/test_api.py b/openedx/features/enterprise_support/tests/test_api.py index 2cdceba3dc2..3a74bcfe8fa 100644 --- a/openedx/features/enterprise_support/tests/test_api.py +++ b/openedx/features/enterprise_support/tests/test_api.py @@ -68,7 +68,6 @@ LOGGER_NAME = "edx.enterprise_helpers" - class MockEnrollment(mock.MagicMock): """ Mock object for an enrollment which has a consistent string representation