Get rid of calls to set_request_cache_with_short_name
This method from the toggle legacy classes should not actually be exposed to all. So we get rid of it by manually setting the cached value. While we are at it, we convert the STORAGE_BACKING_FOR_CACHE legacy waffle switch to its modern version. As the flag is not being used elsewhere, this should not break anything. We take the opportunity to modernize waffle switches from block_structure.config: to do so we convert the INVALIDATE_CACHE_ON_PUBLISH and RAISE_ERROR_WHEN_NOT_FOUND waffle switches from legacy classes to their modern equivalents. These switches are not used outside of edx-platform, so this change should not trigger any error.
This commit is contained in:
@@ -500,9 +500,7 @@ class TestModuleStoreSerializer(TestDumpToNeo4jCommandBase):
|
||||
self.assertEqual(len(submitted), len(self.course_strings))
|
||||
|
||||
# simulate one of the courses being published
|
||||
with override_waffle_switch(
|
||||
block_structure_config.waffle_switch(block_structure_config.STORAGE_BACKING_FOR_CACHE), True
|
||||
):
|
||||
with override_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