From c57042fdd2445558aa1de6c4fb82fdcd39c34e7e Mon Sep 17 00:00:00 2001 From: Andrew Senetar Date: Wed, 11 Jan 2023 23:20:40 -0600 Subject: [PATCH] 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. --- core/tests/scanner_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/tests/scanner_test.py b/core/tests/scanner_test.py index e9379246..35b18395 100644 --- a/core/tests/scanner_test.py +++ b/core/tests/scanner_test.py @@ -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 "".format(self.name, self.path) + def exists(self): + return self.path.exists() + no = NamedObject