From 5eeb7a9d61beb8cb40fd89bd91fcd9dd820035aa Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 17 Dec 2020 16:01:04 -0800 Subject: update fuzzy helper to pass 'reason' through to import code The motivation for this change is to enable passing the 'reason' through to edit extra metadata, in cases where we merge or cluster releases. --- python/tests/import_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/tests/import_common.py') diff --git a/python/tests/import_common.py b/python/tests/import_common.py index 9f04ebe0..d0db014e 100644 --- a/python/tests/import_common.py +++ b/python/tests/import_common.py @@ -63,11 +63,11 @@ def test_fuzzy_match_different(entity_importer, mocker) -> None: match_raw = mocker.patch('fatcat_tools.importers.common.match_release_fuzzy') match_raw.side_effect = [[r3, r2, r3, r2]] resp = entity_importer.match_existing_release_fuzzy(r1) - assert resp == ("STRONG", r2) + assert (resp[0], resp[2]) == ("STRONG", r2) match_raw.side_effect = [[r2, r2, r3, r1]] resp = entity_importer.match_existing_release_fuzzy(r1) - assert resp == ("EXACT", r1) + assert (resp[0], resp[2]) == ("EXACT", r1) match_raw.side_effect = [[r3]] resp = entity_importer.match_existing_release_fuzzy(r1) -- cgit v1.2.3