forked from p15670423/monkey
UT: Remove duplicate SingleFileRepository
This was added by mistake. Remove it!
This commit is contained in:
parent
764bc1559b
commit
e4a2a04765
|
@ -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("")
|
Loading…
Reference in New Issue