Deprecate WaffleSwitch.override* methods
This allows us to get rid of the custom WaffleSwitch and WaffleSwitchNamespace classes from waffle_utils in favour of edx_toggles.toggles classes.
This commit is contained in:
@@ -10,30 +10,23 @@ import ddt
|
||||
import mock
|
||||
import six
|
||||
from django.core.management import call_command
|
||||
|
||||
import openedx.core.djangoapps.content.block_structure.config as block_structure_config
|
||||
from openedx.core.djangoapps.content.block_structure.signals import update_block_structure_on_course_publish
|
||||
from openedx.core.djangoapps.coursegraph.management.commands.dump_to_neo4j import ModuleStoreSerializer
|
||||
from openedx.core.djangoapps.coursegraph.management.commands.tests.utils import MockGraph, MockNodeSelector
|
||||
from openedx.core.djangoapps.coursegraph.tasks import (
|
||||
coerce_types,
|
||||
serialize_course,
|
||||
serialize_item,
|
||||
should_dump_course,
|
||||
strip_branch_and_version
|
||||
)
|
||||
from openedx.core.djangoapps.waffle_utils.testutils import override_waffle_switch
|
||||
from openedx.core.djangolib.testing.utils import skip_unless_lms
|
||||
from xmodule.modulestore.tests.django_utils import SharedModuleStoreTestCase
|
||||
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
|
||||
|
||||
from openedx.core.djangolib.testing.utils import skip_unless_lms
|
||||
|
||||
from openedx.core.djangoapps.coursegraph.management.commands.dump_to_neo4j import (
|
||||
ModuleStoreSerializer
|
||||
)
|
||||
from openedx.core.djangoapps.coursegraph.management.commands.tests.utils import (
|
||||
MockGraph,
|
||||
MockNodeSelector,
|
||||
)
|
||||
from openedx.core.djangoapps.coursegraph.tasks import (
|
||||
serialize_item,
|
||||
serialize_course,
|
||||
coerce_types,
|
||||
should_dump_course,
|
||||
strip_branch_and_version,
|
||||
)
|
||||
from openedx.core.djangoapps.content.block_structure.signals import (
|
||||
update_block_structure_on_course_publish
|
||||
)
|
||||
import openedx.core.djangoapps.content.block_structure.config as block_structure_config
|
||||
|
||||
|
||||
class TestDumpToNeo4jCommandBase(SharedModuleStoreTestCase):
|
||||
"""
|
||||
@@ -507,7 +500,9 @@ class TestModuleStoreSerializer(TestDumpToNeo4jCommandBase):
|
||||
self.assertEqual(len(submitted), len(self.course_strings))
|
||||
|
||||
# simulate one of the courses being published
|
||||
with block_structure_config.waffle().override(block_structure_config.STORAGE_BACKING_FOR_CACHE):
|
||||
with override_waffle_switch(
|
||||
block_structure_config.waffle_switch(block_structure_config.STORAGE_BACKING_FOR_CACHE), True
|
||||
):
|
||||
update_block_structure_on_course_publish(None, self.course.id)
|
||||
|
||||
# make sure only the published course was dumped
|
||||
|
||||
Reference in New Issue
Block a user