diff --git a/superdesk/commands/data_manipulation.py b/superdesk/commands/data_manipulation.py index 2c5beb08ad..48b71812fa 100644 --- a/superdesk/commands/data_manipulation.py +++ b/superdesk/commands/data_manipulation.py @@ -34,6 +34,7 @@ from superdesk.timer import timer from superdesk.resource import Resource from superdesk.services import BaseService +from superdesk.cache import cache from . import data_updates, flush_elastic_index @@ -488,6 +489,7 @@ def run(self, dump_path: Union[Path, str], keep_existing: bool = False, no_flush except Exception: logger.exception("😭 Something went wrong") sys.exit(1) + cache.clean() print("🏁 All done") def restore_file(self, archive_path: Path): diff --git a/tests/io/feed_parsers/wordpress_wxr_test.py b/tests/io/feed_parsers/wordpress_wxr_test.py index 4b1588170e..4866c95e37 100644 --- a/tests/io/feed_parsers/wordpress_wxr_test.py +++ b/tests/io/feed_parsers/wordpress_wxr_test.py @@ -83,9 +83,13 @@ def fake_update_renditions(item, url, _): class WPWXRTestBase(TestCase): + filename = None + @mock.patch.object(wordpress_wxr, "update_renditions", fake_update_renditions) def __init__(self, methodname): super().__init__(methodname) + if self.filename is None: + return dirname = os.path.dirname(os.path.realpath(__file__)) fixture = os.path.normpath(os.path.join(dirname, "../fixtures", self.filename)) provider = {"name": "Test"}