summaryrefslogtreecommitdiffstats
path: root/python/fatcat_tools/transforms/elasticsearch.py
diff options
context:
space:
mode:
authorMartin Czygan <martin@archive.org>2020-07-10 21:32:41 +0000
committerMartin Czygan <martin@archive.org>2020-07-10 21:32:41 +0000
commit3c266e07771271241aa8cff3e3199a45109362af (patch)
tree73fa6aedf1bbfeffeac9c94593f5f9c4f2dd645b /python/fatcat_tools/transforms/elasticsearch.py
parentfdf1028c19b0623e30b91e49ffa65ed130dcfdc1 (diff)
parentc9d8550be4bab808c2bad0b0d3642a71075202c0 (diff)
downloadfatcat-3c266e07771271241aa8cff3e3199a45109362af.tar.gz
fatcat-3c266e07771271241aa8cff3e3199a45109362af.zip
datacite: resolve formatting issues in tests
Diffstat (limited to 'python/fatcat_tools/transforms/elasticsearch.py')
-rw-r--r--python/fatcat_tools/transforms/elasticsearch.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/python/fatcat_tools/transforms/elasticsearch.py b/python/fatcat_tools/transforms/elasticsearch.py
index 1d35141b..8ec9c164 100644
--- a/python/fatcat_tools/transforms/elasticsearch.py
+++ b/python/fatcat_tools/transforms/elasticsearch.py
@@ -1,7 +1,5 @@
-import collections
import tldextract
-from fatcat_openapi_client import ApiClient
def check_kbart(year, archive):
@@ -14,11 +12,11 @@ def check_kbart(year, archive):
def test_check_kbart():
- assert check_kbart(1990, dict()) == None
- assert check_kbart(1990, dict(year_spans=[[2000, 2000]])) == False
- assert check_kbart(2000, dict(year_spans=[[2000, 2000]])) == True
- assert check_kbart(1950, dict(year_spans=[[1900, 1920], [1990, 2000]])) == False
- assert check_kbart(1950, dict(year_spans=[[1900, 1920], [1930, 2000]])) == True
+ assert check_kbart(1990, dict()) is None
+ assert check_kbart(1990, dict(year_spans=[[2000, 2000]])) is False
+ assert check_kbart(2000, dict(year_spans=[[2000, 2000]])) is True
+ assert check_kbart(1950, dict(year_spans=[[1900, 1920], [1990, 2000]])) is False
+ assert check_kbart(1950, dict(year_spans=[[1900, 1920], [1930, 2000]])) is True
def release_to_elasticsearch(entity, force_bool=True):