aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/api_editor.py
blob: 64bb27594a0e8ec73672cc1e8664cc6a18b3db3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

import json
import pytest
import datetime
from copy import copy

from fatcat_openapi_client import *
from fatcat_openapi_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