summaryrefslogtreecommitdiffstats
path: root/python/tests/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-06-21 18:22:12 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-06-21 18:22:12 -0700
commit416117af51592b2a60b317427dc034544347b435 (patch)
tree3785fa46d6c9ff8a1d6301b781b51c88987215d7 /python/tests/routes.py
parent7b327b742458df72691c6cc9311af74091719ce1 (diff)
downloadfatcat-416117af51592b2a60b317427dc034544347b435.tar.gz
fatcat-416117af51592b2a60b317427dc034544347b435.zip
implement webface lookups (by url; no search form)
Diffstat (limited to 'python/tests/routes.py')
-rw-r--r--python/tests/routes.py26
1 files changed, 22 insertions, 4 deletions
diff --git a/python/tests/routes.py b/python/tests/routes.py
index d0af67c9..b2cfd058 100644
--- a/python/tests/routes.py
+++ b/python/tests/routes.py
@@ -24,22 +24,40 @@ def test_all_views(app):
rv = app.get('/{}/f1f046a3-45c9-ffff-ffff-ffffffffffff'.format(route))
assert rv.status_code == 404
- rv = app.get('/container/00000000-0000-0000-1111-000000000002'.format(route))
+ rv = app.get('/container/00000000-0000-0000-1111-000000000002')
assert rv.status_code == 200
rv = app.get('/container/create')
assert rv.status_code == 200
- rv = app.get('/creator/00000000-0000-0000-2222-000000000002'.format(route))
+ rv = app.get('/container/lookup')
+ assert rv.status_code == 400
+
+ rv = app.get('/container/lookup?issnl=9999-9999')
+ assert rv.status_code == 404
+
+ rv = app.get('/container/lookup?issnl=1234-5678')
+ assert rv.status_code == 302
+
+ rv = app.get('/creator/00000000-0000-0000-2222-000000000002')
assert rv.status_code == 200
- rv = app.get('/file/00000000-0000-0000-3333-000000000002'.format(route))
+ rv = app.get('/creator/lookup?orcid=0000-0003-2088-7465')
+ assert rv.status_code == 302
+
+ rv = app.get('/file/00000000-0000-0000-3333-000000000002')
+ assert rv.status_code == 200
+
+ rv = app.get('/file/lookup?sha1=7d97e98f8af710c7e7fe703abc8f639e0ee507c4')
+ assert rv.status_code == 302
+
+ rv = app.get('/release/00000000-0000-0000-4444-000000000002')
assert rv.status_code == 200
rv = app.get('/release/00000000-0000-0000-4444-000000000002'.format(route))
assert rv.status_code == 200
- rv = app.get('/work/00000000-0000-0000-5555-000000000002'.format(route))
+ rv = app.get('/work/00000000-0000-0000-5555-000000000002')
assert rv.status_code == 200
rv = app.get('/work/create')