From 1d46fa7b4242554247f09f8fb5773257fd2e186a Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Fri, 13 Dec 2024 15:47:48 -0500 Subject: [PATCH] test: inherit of ModuleStoreTestCase --- .../core/djangoapps/schedules/tests/test_filters.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/openedx/core/djangoapps/schedules/tests/test_filters.py b/openedx/core/djangoapps/schedules/tests/test_filters.py index 8b80474c0f8..94235eb4001 100644 --- a/openedx/core/djangoapps/schedules/tests/test_filters.py +++ b/openedx/core/djangoapps/schedules/tests/test_filters.py @@ -5,18 +5,20 @@ import datetime from unittest.mock import Mock -from django.test import TestCase, override_settings +from django.db.models.query import QuerySet +from django.test import override_settings from openedx_filters import PipelineStep from openedx.core.djangoapps.schedules.resolvers import BinnedSchedulesBaseResolver from openedx.core.djangoapps.schedules.tests.test_resolvers import SchedulesResolverTestMixin from openedx.core.djangolib.testing.utils import skip_unless_lms +from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase class TestScheduleQuerySetRequestedPipelineStep(PipelineStep): """Pipeline step class to test a configured pipeline step""" - filtered_schedules = Mock() + filtered_schedules = Mock(spec=QuerySet) def run_filter(self, schedules): # pylint: disable=arguments-differ """Pipeline step to filter the schedules""" @@ -26,7 +28,7 @@ def run_filter(self, schedules): # pylint: disable=arguments-differ @skip_unless_lms -class ScheduleQuerySetRequestedFiltersTest(SchedulesResolverTestMixin, TestCase): +class ScheduleQuerySetRequestedFiltersTest(SchedulesResolverTestMixin, ModuleStoreTestCase): """ Tests for the Open edX Filters associated with the schedule queryset requested. @@ -41,7 +43,7 @@ def setUp(self): site=self.site, target_datetime=datetime.datetime.now(), day_offset=3, - bin_num=2, + bin_num=1, ) @override_settings(