aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests
diff options
context:
space:
mode:
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