aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-05-07 18:51:47 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-05-07 18:51:47 -0700
commit38dc6686c3acf1d3e970e5969da1e893915cf87e (patch)
treed5bbf6dbb15cfa5cfbba7df6c90e4fe12e348a24 /python/tests
parent9ab1890ffea99fa829b603b5a402c2452844b98c (diff)
downloadfatcat-38dc6686c3acf1d3e970e5969da1e893915cf87e.tar.gz
fatcat-38dc6686c3acf1d3e970e5969da1e893915cf87e.zip
very basic editor update test
Diffstat (limited to 'python/tests')
-rw-r--r--python/tests/api_editor.py24
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