summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/api.py21
-rw-r--r--tests/routes.py6
2 files changed, 27 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
diff --git a/tests/routes.py b/tests/routes.py
index 49afc5ce..e389a55f 100644
--- a/tests/routes.py
+++ b/tests/routes.py
@@ -32,3 +32,9 @@ def test_all_views(rich_app):
rv = app.get('/editgroup/1')
assert rv.status_code == 200
+
+ rv = app.get('/editor/admin')
+ assert rv.status_code == 200
+
+ rv = app.get('/editor/admin/changelog')
+ assert rv.status_code == 200