summaryrefslogtreecommitdiffstats
path: root/python/tests/api_containers.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/api_containers.py')
-rw-r--r--python/tests/api_containers.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/tests/api_containers.py b/python/tests/api_containers.py
index 25a10837..0f6c85b1 100644
--- a/python/tests/api_containers.py
+++ b/python/tests/api_containers.py
@@ -39,6 +39,20 @@ def test_container(api):
assert c2.revision == c2_rev.revision
assert c2.name == c2_rev.name
+ # lookups
+ tmp = api.lookup_container(issnl=c1.issnl)
+ assert tmp.revision == c2.revision
+ tmp = api.lookup_container(issne=c1.issne)
+ assert tmp.revision == c2.revision
+ tmp = api.lookup_container(issnp=c1.issnp)
+ assert tmp.revision == c2.revision
+ tmp = api.lookup_container(issn=c1.issnp)
+ assert tmp.revision == c2.revision
+ with pytest.raises(fatcat_openapi_client.rest.ApiException):
+ api.lookup_container(issne=c1.issnp)
+ with pytest.raises(fatcat_openapi_client.rest.ApiException):
+ api.lookup_container(issnp=c1.issne)
+
# get redirects (none)
assert api.get_container_redirects(c2.ident) == []