mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-05-06 17:09:49 +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:
parent
057be0294a
commit
c57042fdd2
@ -17,6 +17,7 @@ from core.scanner import Scanner, ScanType
|
|||||||
from core.me.scanner import ScannerME
|
from core.me.scanner import ScannerME
|
||||||
|
|
||||||
|
|
||||||
|
# TODO update this to be able to inherit from fs.File
|
||||||
class NamedObject:
|
class NamedObject:
|
||||||
def __init__(self, name="foobar", size=1, path=None):
|
def __init__(self, name="foobar", size=1, path=None):
|
||||||
if path is None:
|
if path is None:
|
||||||
@ -31,6 +32,9 @@ class NamedObject:
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<NamedObject {!r} {!r}>".format(self.name, self.path)
|
return "<NamedObject {!r} {!r}>".format(self.name, self.path)
|
||||||
|
|
||||||
|
def exists(self):
|
||||||
|
return self.path.exists()
|
||||||
|
|
||||||
|
|
||||||
no = NamedObject
|
no = NamedObject
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user