fix: Resolve issue with mock object for core test

Last change introduced a new method on the fs.File object that the test
object did not have.  Add similar method to test object.
This commit is contained in:
Andrew Senetar 2023-01-11 23:20:40 -06:00
parent 057be0294a
commit c57042fdd2
Signed by: arsenetar
GPG Key ID: C63300DCE48AB2F1
1 changed files with 4 additions and 0 deletions

View File

@ -17,6 +17,7 @@ from core.scanner import Scanner, ScanType
from import ScannerME
# TODO update this to be able to inherit from fs.File
class NamedObject:
def __init__(self, name="foobar", size=1, path=None):
if path is None:
@ -31,6 +32,9 @@ class NamedObject:
def __repr__(self):
return "<NamedObject {!r} {!r}>".format(, self.path)
def exists(self):
return self.path.exists()
no = NamedObject