diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-23 20:36:57 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-04-23 20:36:57 -0700 |
commit | 95317172ddee2ea6f18512262f481dd7f6fede8b (patch) | |
tree | 29f80630f8b63dbade028049a7c38ee871ca50cb /tests/api.py | |
parent | 2688e18228e15558c99f1372f003ca95e7be4523 (diff) | |
download | fatcat-95317172ddee2ea6f18512262f481dd7f6fede8b.tar.gz fatcat-95317172ddee2ea6f18512262f481dd7f6fede8b.zip |
basic api+route views for editor/changelog
Diffstat (limited to 'tests/api.py')
-rw-r--r-- | tests/api.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/api.py b/tests/api.py index 8b495c61..5fff779e 100644 --- a/tests/api.py +++ b/tests/api.py @@ -287,3 +287,24 @@ def test_api_container_lookup(rich_app): data=json.dumps(dict(issn="not_even_valid_issn")), headers={"content-type": "application/json"}) assert rv.status_code == 400 + +def test_api_editor_get(rich_app): + app = rich_app + + rv = app.get('/v0/editor/admin', + headers={"content-type": "application/json"}) + assert rv.status_code == 200 + obj = json.loads(rv.data.decode('utf-8')) + print(obj) + assert obj['username'] == "admin" + assert obj['id'] == 1 + +def test_api_editor_changelog(rich_app): + app = rich_app + + rv = app.get('/v0/editor/admin/changelog', + headers={"content-type": "application/json"}) + assert rv.status_code == 200 + obj = json.loads(rv.data.decode('utf-8')) + print(obj) + assert len(obj) == 1 |