aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMartin Czygan <martin.czygan@gmail.com>2020-12-16 02:21:49 +0100
committerMartin Czygan <martin.czygan@gmail.com>2020-12-16 02:21:49 +0100
commit6eb88820feb50136571487436b515ed6b748e17d (patch)
tree4f94c02ce585cf2b0c77f6530b07c3b1f2e10a5d /tests
parentcfd1bd54f8df435d4c5fb1d4d40943f637203398 (diff)
downloadfuzzycat-6eb88820feb50136571487436b515ed6b748e17d.tar.gz
fuzzycat-6eb88820feb50136571487436b515ed6b748e17d.zip
docs and release match command
Diffstat (limited to 'tests')
-rw-r--r--tests/test_matching.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/test_matching.py b/tests/test_matching.py
index 927b383..cded2c8 100644
--- a/tests/test_matching.py
+++ b/tests/test_matching.py
@@ -2,18 +2,25 @@ from fuzzycat.matching import anything_to_entity, match_release_fuzzy
from fatcat_openapi_client import ReleaseEntity
import pytest
import elasticsearch
+import logging
+
+logger = logging.getLogger('test_matching')
+logger.setLevel(logging.DEBUG)
+
@pytest.fixture
def es_client():
- return elasticsearch.Elasticsearch(["https://search.fatcat.wiki:80"])
+ return elasticsearch.Elasticsearch(["https://search.fatcat.wiki:443"])
+
@pytest.mark.skip
def test_match_release_fuzzy(es_client):
- cases = (
- ("wtv64ahbdzgwnan7rllwr3nurm", 2),
- )
+ cases = (("wtv64ahbdzgwnan7rllwr3nurm", 2), )
for case, count in cases:
entity = anything_to_entity(case, ReleaseEntity)
+ logger.info(entity.title)
result = match_release_fuzzy(entity, es=es_client)
+ logger.info("given: {}".format(entity.title))
+ logger.info("found: {}".format(len(result)))
assert len(result) == count