aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_transform.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-03 22:46:16 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-03 22:46:16 -0700
commit62d3299471b7b4229ae63e21e9d45ef7efde4348 (patch)
treefc0d04531ce4c81224723bd3646c88f74c7c42a2 /tests/test_transform.py
parent58688676ee2d96d9d7006e2fd8a14d47f271aa8f (diff)
downloadfatcat-scholar-62d3299471b7b4229ae63e21e9d45ef7efde4348.tar.gz
fatcat-scholar-62d3299471b7b4229ae63e21e9d45ef7efde4348.zip
reformat python code with black
Diffstat (limited to 'tests/test_transform.py')
-rw-r--r--tests/test_transform.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/tests/test_transform.py b/tests/test_transform.py
index 3c29d18..d831f47 100644
--- a/tests/test_transform.py
+++ b/tests/test_transform.py
@@ -1,28 +1,34 @@
-
import pytest
from fatcat_openapi_client import ReleaseEntity
from fatcat_scholar.schema import *
from fatcat_scholar.api_entities import *
+
def test_es_release_from_release():
- with open('tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json', 'r') as f:
+ with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json", "r") as f:
release = entity_from_json(f.read(), ReleaseEntity)
-
+
obj = es_release_from_release(release)
d = json.loads(obj.json())
- assert obj.ident == release.ident == d['ident'] == "hsmo6p4smrganpb3fndaj2lon4"
+ assert obj.ident == release.ident == d["ident"] == "hsmo6p4smrganpb3fndaj2lon4"
assert obj.doi_registrar == "crossref"
assert obj.doi_prefix == "10.7717"
+
def test_es_biblio_from_release():
- with open('tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json', 'r') as f:
+ with open("tests/files/release_hsmo6p4smrganpb3fndaj2lon4.json", "r") as f:
release = entity_from_json(f.read(), ReleaseEntity)
-
+
obj = es_biblio_from_release(release)
d = json.loads(obj.json())
- assert obj.release_ident == release.ident == d['release_ident'] == "hsmo6p4smrganpb3fndaj2lon4"
+ assert (
+ obj.release_ident
+ == release.ident
+ == d["release_ident"]
+ == "hsmo6p4smrganpb3fndaj2lon4"
+ )