summaryrefslogtreecommitdiffstats
path: root/python/tests/api_containers.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-07 18:16:46 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-07 18:16:46 -0700
commit75a824c0fd5697f7748f57f09e022bce97d32e0c (patch)
tree5ca687144a9deafa821c6a06a90e475e07cd405f /python/tests/api_containers.py
parent778e71eb30a44dc6dce51709d2b70ba1559fc98b (diff)
downloadfatcat-75a824c0fd5697f7748f57f09e022bce97d32e0c.tar.gz
fatcat-75a824c0fd5697f7748f57f09e022bce97d32e0c.zip
test basic entity revision GET
Diffstat (limited to 'python/tests/api_containers.py')
-rw-r--r--python/tests/api_containers.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/python/tests/api_containers.py b/python/tests/api_containers.py
index 674ae3b8..ad6d03be 100644
--- a/python/tests/api_containers.py
+++ b/python/tests/api_containers.py
@@ -33,16 +33,18 @@ def test_container(api):
assert c1.wikidata_qid == c2.wikidata_qid
assert c1.extra == c2.extra
- # expansion
- # TODO: via release
- # lookup
- # TODO: via issnl; but need to generate random identifiers
+ # get revision
+ c2_rev = api.get_container_revision(c1edit.revision)
+ assert c1edit.revision == c2_rev.revision
+ assert c2.revision == c2_rev.revision
+ assert c2.name == c2_rev.name
def test_container_examples(api):
- api.lookup_container(issnl='1549-1277')
-
c1 = api.get_container('aaaaaaaaaaaaaeiraaaaaaaaam')
assert c1.name == "PLOS Medicine"
assert c1.issnl == "1549-1277"
+ c2 = api.lookup_container(issnl=c1.issnl)
+ assert c1.ident == c2.ident
+