def _clean(): volatile = VolatileFactory.get_client() persistent = PersistentFactory.get_client() # noinspection PyProtectedMember volatile._clean() # noinspection PyProtectedMember persistent._clean() # noinspection PyProtectedMember SSHClient._clean() # noinspection PyProtectedMember SystemdMock._clean() # noinspection PyProtectedMember MDSClient._clean() # noinspection PyProtectedMember Decorators._clean() # noinspection PyProtectedMember MockedSSHClient._clean() # noinspection PyProtectedMember StorageRouterClient._clean() Logger._logs = {} DataList._test_hooks = {} Toolbox._function_pointers = {} # Clean underlying persistent store Configuration.get_client()._clean() for file_name in glob.glob( ArakoonClusterConfig.CONFIG_FILE.format('unittest*')): os.remove(file_name) for full_path in glob.glob(DalHelper.UNITTEST_DIR.format('*')): shutil.rmtree(full_path) return volatile, persistent