aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/import_common.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2020-12-17 16:01:04 -0800
committerBryan Newbold <bnewbold@robocracy.org>2020-12-17 16:01:06 -0800
commit5eeb7a9d61beb8cb40fd89bd91fcd9dd820035aa (patch)
tree1532f36e1284210c13584e9a4e57dfed61b3142c /python/tests/import_common.py
parentd5c8b54aaf600764bc59855c4529952195c87fb5 (diff)
downloadfatcat-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/import_common.py')
-rw-r--r--python/tests/import_common.py4
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)