From e4ad89d9defcbc8f67f7c61f3cb7d4f1a1fbc28e Mon Sep 17 00:00:00 2001 From: Navin Karkera Date: Thu, 6 Feb 2025 12:22:09 +0530 Subject: [PATCH] test: fix weird failure in CI only --- cms/djangoapps/contentstore/tests/test_utils.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/cms/djangoapps/contentstore/tests/test_utils.py b/cms/djangoapps/contentstore/tests/test_utils.py index a91379797060..a46d9831d4e5 100644 --- a/cms/djangoapps/contentstore/tests/test_utils.py +++ b/cms/djangoapps/contentstore/tests/test_utils.py @@ -12,6 +12,7 @@ from edx_toggles.toggles.testutils import override_waffle_flag from opaque_keys.edx.keys import CourseKey from opaque_keys.edx.locator import CourseLocator, LibraryLocator +from openedx_events.tests.utils import OpenEdxEventsTestMixin from path import Path as path from pytz import UTC from rest_framework import status @@ -31,10 +32,13 @@ from xmodule.modulestore.tests.django_utils import ( # lint-amnesty, pylint: disable=wrong-import-order TEST_DATA_SPLIT_MODULESTORE, ModuleStoreTestCase, - SharedModuleStoreTestCase + SharedModuleStoreTestCase, ) -from xmodule.modulestore.tests.factories import CourseFactory, BlockFactory # lint-amnesty, pylint: disable=wrong-import-order -from xmodule.partitions.partitions import Group, UserPartition # lint-amnesty, pylint: disable=wrong-import-order +from xmodule.modulestore.tests.factories import ( + BlockFactory, + CourseFactory, +) +from xmodule.partitions.partitions import Group, UserPartition class LMSLinksTestCase(TestCase): @@ -935,10 +939,13 @@ def test_update_course_details_instructor_paced(self, mock_update): @override_waffle_flag(ENABLE_NOTIFICATIONS, active=True) -class CourseUpdateNotificationTests(ModuleStoreTestCase): +class CourseUpdateNotificationTests(OpenEdxEventsTestMixin, ModuleStoreTestCase): """ Unit tests for the course_update notification. """ + ENABLED_OPENEDX_EVENTS = [ + "org.openedx.learning.course.notification.requested.v1", + ] def setUp(self): """