summaryrefslogtreecommitdiffstats
path: root/python/tests/transform_tests.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-11-26 19:26:02 -0800
committerBryan Newbold <bnewbold@robocracy.org>2018-11-26 19:26:02 -0800
commit767018eae6c628e0add27a0f187327b25d8569dc (patch)
treeec080337a337dd64c7c532ee1bd616a8cb3f851b /python/tests/transform_tests.py
parent8b84e83b79de67996e61a3a830e8f395b68085e5 (diff)
downloadfatcat-767018eae6c628e0add27a0f187327b25d8569dc.tar.gz
fatcat-767018eae6c628e0add27a0f187327b25d8569dc.zip
fix file extraction (and transforms)
Diffstat (limited to 'python/tests/transform_tests.py')
-rw-r--r--python/tests/transform_tests.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/tests/transform_tests.py b/python/tests/transform_tests.py
index 18522eff..a42db244 100644
--- a/python/tests/transform_tests.py
+++ b/python/tests/transform_tests.py
@@ -2,6 +2,7 @@
import json
import pytest
from fatcat_tools import *
+from fatcat_client import *
from import_crossref import crossref_importer
@@ -12,3 +13,7 @@ def test_elasticsearch_convert(crossref_importer):
(r, c) = crossref_importer.parse_crossref_dict(raw)
r.state = 'active'
release_to_elasticsearch(r)
+
+def test_elasticsearch_from_json():
+ r = entity_from_json(open('./tests/files/math_universe.json', 'r').read(), ReleaseEntity)
+ release_to_elasticsearch(r)