From 38dc6686c3acf1d3e970e5969da1e893915cf87e Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 7 May 2019 18:51:47 -0700 Subject: very basic editor update test --- python/tests/api_editor.py | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 python/tests/api_editor.py (limited to 'python/tests') 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 -- cgit v1.2.3