def mock_get_pandas(monkeypatch): pandas_set, get_pandas = function_result_creator() def wrapped(replay_id): return get_pandas() monkeypatch.setattr('backend.utils.file_manager.FileManager.get_pandas', wrapped) return pandas_set
def mock_get_replay(dynamic_monkey_patcher): replay_set, get_replay = function_result_creator() def wrapped(replay_id): return get_replay() from backend.utils.file_manager import FileManager dynamic_monkey_patcher.patch_object(FileManager, 'get_replay', wrapped) return replay_set