1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-12-21 10:59:03 +00:00

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

View File

@ -17,6 +17,7 @@ from core.scanner import Scanner, ScanType
from core.me.scanner 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.name, self.path)
def exists(self):
return self.path.exists()
no = NamedObject