diff options
Diffstat (limited to 'python/tests/api_editor.py')
-rw-r--r-- | python/tests/api_editor.py | 23 |
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") |