diff --git a/core_me/tests/scanner_test.py b/core_me/tests/scanner_test.py index 7fdfe66d..0c8edb5a 100644 --- a/core_me/tests/scanner_test.py +++ b/core_me/tests/scanner_test.py @@ -11,18 +11,9 @@ from hscommon import io from hscommon.path import Path from core.engine import getwords +from core.tests.scanner_test import NamedObject, no from ..scanner import * -class NamedObject: - def __init__(self, name="foobar", size=1): - self.name = name - self.size = size - self.path = Path('') - self.words = getwords(name) - - -no = NamedObject - def pytest_funcarg__fake_fileexists(request): # This is a hack to avoid invalidating all previous tests since the scanner started to test # for file existence before doing the match grouping. @@ -32,7 +23,7 @@ def pytest_funcarg__fake_fileexists(request): def test_priorize_me(fake_fileexists): # in ScannerME, bitrate goes first (right after is_ref) in priorization s = ScannerME() - o1, o2 = no('foo'), no('foo') + o1, o2 = no('foo', path='p1'), no('foo', path='p2') o1.bitrate = 1 o2.bitrate = 2 [group] = s.get_dupe_groups([o1, o2])