diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2020-12-17 16:01:04 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2020-12-17 16:01:06 -0800 |
commit | 5eeb7a9d61beb8cb40fd89bd91fcd9dd820035aa (patch) | |
tree | 1532f36e1284210c13584e9a4e57dfed61b3142c /python/tests | |
parent | d5c8b54aaf600764bc59855c4529952195c87fb5 (diff) | |
download | fatcat-5eeb7a9d61beb8cb40fd89bd91fcd9dd820035aa.tar.gz fatcat-5eeb7a9d61beb8cb40fd89bd91fcd9dd820035aa.zip |
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.
Diffstat (limited to 'python/tests')
-rw-r--r-- | python/tests/import_common.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |