summaryrefslogtreecommitdiffstats
path: root/python/tests/transform_toml.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-11-02 18:13:14 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-11-02 18:13:14 -0700
commitcdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7 (patch)
tree5e4034027b51f3ee4d2a488bb2cbb7a75c3bd0d8 /python/tests/transform_toml.py
parent78f08280edea4ff65ca613ad30005c45cc48dea6 (diff)
downloadfatcat-cdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7.tar.gz
fatcat-cdfd6b85b386b7bbf9d5a5179ef26970b6e5a4e7.zip
fmt (black): tests/
Diffstat (limited to 'python/tests/transform_toml.py')
-rw-r--r--python/tests/transform_toml.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/python/tests/transform_toml.py b/python/tests/transform_toml.py
index 29da1d38..56bf32a1 100644
--- a/python/tests/transform_toml.py
+++ b/python/tests/transform_toml.py
@@ -1,4 +1,3 @@
-
import json
from fatcat_openapi_client import ReleaseEntity
@@ -9,15 +8,15 @@ from fatcat_tools.transforms import entity_from_toml, entity_to_toml
def test_basic_toml(crossref_importer):
- with open('tests/files/crossref-works.single.json', 'r') as f:
+ with open("tests/files/crossref-works.single.json", "r") as f:
# not a single line
raw = json.loads(f.read())
r = crossref_importer.parse_record(raw)
- r.state = 'active'
+ r.state = "active"
toml_str = entity_to_toml(r)
r2 = entity_from_toml(toml_str, ReleaseEntity)
assert r == r2
- toml_str = entity_to_toml(r, pop_fields=['ident', 'revision', 'blah', 'extra'])
+ toml_str = entity_to_toml(r, pop_fields=["ident", "revision", "blah", "extra"])
r3 = entity_from_toml(toml_str, ReleaseEntity)
assert r != r3