diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-07 18:51:47 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-05-07 18:51:47 -0700 |
commit | 38dc6686c3acf1d3e970e5969da1e893915cf87e (patch) | |
tree | d5bbf6dbb15cfa5cfbba7df6c90e4fe12e348a24 /python/tests | |
parent | 9ab1890ffea99fa829b603b5a402c2452844b98c (diff) | |
download | fatcat-38dc6686c3acf1d3e970e5969da1e893915cf87e.tar.gz fatcat-38dc6686c3acf1d3e970e5969da1e893915cf87e.zip |
very basic editor update test
Diffstat (limited to 'python/tests')
-rw-r--r-- | python/tests/api_editor.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/python/tests/api_editor.py b/python/tests/api_editor.py new file mode 100644 index 00000000..637736e4 --- /dev/null +++ b/python/tests/api_editor.py @@ -0,0 +1,24 @@ + +import json +import pytest +import datetime +from copy import copy + +from fatcat_client import * +from fatcat_client.rest import ApiException +from fixtures import * + + +def test_editor_update(api): + + editor_id = api.editor_id + orig = api.get_editor(editor_id) + newer = api.get_editor(editor_id) + newer.username = "temp-bogus-username" + api.update_editor(editor_id, newer) + check = api.get_editor(editor_id) + assert check.username != orig.username + assert check.editor_id == orig.editor_id + api.update_editor(editor_id, orig) + check = api.get_editor(editor_id) + assert check == orig |