UT: Remove duplicate SingleFileRepository

This was added by mistake. Remove it!
This commit is contained in:
Mike Salvatore 2022-06-17 19:14:38 -04:00
parent 764bc1559b
commit e4a2a04765
1 changed files with 0 additions and 23 deletions

View File

@ -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("")