From e4a2a04765e20d4d7b0481cf5e11e4bd169d6bd8 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 17 Jun 2022 19:14:38 -0400 Subject: [PATCH] UT: Remove duplicate SingleFileRepository This was added by mistake. Remove it! --- monkey/tests/common/SingleFileRepository.py | 23 --------------------- 1 file changed, 23 deletions(-) delete mode 100644 monkey/tests/common/SingleFileRepository.py diff --git a/monkey/tests/common/SingleFileRepository.py b/monkey/tests/common/SingleFileRepository.py deleted file mode 100644 index d00ee9ae9..000000000 --- a/monkey/tests/common/SingleFileRepository.py +++ /dev/null @@ -1,23 +0,0 @@ -import io -from typing import BinaryIO - -from monkey_island.cc.repository import FileRetrievalError, IFileRepository - - -class SingleFileRepository(IFileRepository): - def __init__(self): - self._file = None - - def save_file(self, unsafe_file_name: str, file_contents: BinaryIO): - self._file = io.BytesIO(file_contents.read()) - - def open_file(self, unsafe_file_name: str) -> BinaryIO: - if self._file is None: - raise FileRetrievalError() - return self._file - - def delete_file(self, unsafe_file_name: str): - self._file = None - - def delete_all_files(self): - self.delete_file("")