aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/api_editor.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2021-10-12 20:05:30 -0700
committerBryan Newbold <bnewbold@robocracy.org>2021-10-13 16:21:31 -0700
commit85f4124d0c70b9fb55e6f549cfd906fcf8783c6f (patch)
treea60100fbb7db2590014aea7d3f9c186f46a39fcb /python/tests/api_editor.py
parent88497e378e2e4c93906c7485865724133511d4e6 (diff)
downloadfatcat-85f4124d0c70b9fb55e6f549cfd906fcf8783c6f.tar.gz
fatcat-85f4124d0c70b9fb55e6f549cfd906fcf8783c6f.zip
python: test coverage of rust schema changes
Diffstat (limited to 'python/tests/api_editor.py')
-rw-r--r--python/tests/api_editor.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/python/tests/api_editor.py b/python/tests/api_editor.py
index 91881743..ab118501 100644
--- a/python/tests/api_editor.py
+++ b/python/tests/api_editor.py
@@ -1,4 +1,8 @@
+import pytest
+
+import fatcat_openapi_client
+
from fixtures import api
@@ -15,3 +19,22 @@ def test_editor_update(api):
api.update_editor(editor_id, orig)
check = api.get_editor(editor_id)
assert check == orig
+
+def test_editor_get(api):
+
+ editor_id = api.editor_id
+ api.get_editor(editor_id)
+
+def test_editor_lookup(api):
+
+ editor_id = api.editor_id
+ e1 = api.get_editor(editor_id)
+
+ e2 = api.lookup_editor(username=e1.username)
+ assert e1.editor_id == e2.editor_id
+
+ with pytest.raises(fatcat_openapi_client.rest.ApiException):
+ api.lookup_editor(username="")
+
+ with pytest.raises(fatcat_openapi_client.rest.ApiException):
+ api.lookup_editor(username="bogus-username-notfound")