Skip to content

Commit

Permalink
test: inherit of ModuleStoreTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Dec 13, 2024
1 parent dbf97ed commit 1d46fa7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions openedx/core/djangoapps/schedules/tests/test_filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand All @@ -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.
Expand All @@ -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(
Expand Down

0 comments on commit 1d46fa7

Please sign in to comment.