aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-15 04:24:38 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-15 04:24:38 +0100
commit135675d544dab8629900bd9c8816b9a094118ad8 (patch)
treeed3e660816ecd43847a12467332c3bc48236554d /tests
parent103f75a6e6af836f7a4afa5746847ef7ce63591d (diff)
downloadfuzzycat-135675d544dab8629900bd9c8816b9a094118ad8.tar.gz
fuzzycat-135675d544dab8629900bd9c8816b9a094118ad8.zip
matching stub
Diffstat (limited to 'tests')
-rw-r--r--tests/test_matching.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_matching.py b/tests/test_matching.py
new file mode 100644
index 0000000..927b383
--- /dev/null
+++ b/tests/test_matching.py
@@ -0,0 +1,19 @@
+from fuzzycat.matching import anything_to_entity, match_release_fuzzy
+from fatcat_openapi_client import ReleaseEntity
+import pytest
+import elasticsearch
+
+@pytest.fixture
+def es_client():
+ return elasticsearch.Elasticsearch(["https://search.fatcat.wiki:80"])
+
+@pytest.mark.skip
+def test_match_release_fuzzy(es_client):
+ cases = (
+ ("wtv64ahbdzgwnan7rllwr3nurm", 2),
+ )
+ for case, count in cases:
+ entity = anything_to_entity(case, ReleaseEntity)
+
+ result = match_release_fuzzy(entity, es=es_client)
+ assert len(result) == count