aboutsummaryrefslogtreecommitdiffstats
path: root/python/tests/routes.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/routes.py')
-rw-r--r--python/tests/routes.py40
1 files changed, 20 insertions, 20 deletions
diff --git a/python/tests/routes.py b/python/tests/routes.py
index bca7cc0f..7b4ac442 100644
--- a/python/tests/routes.py
+++ b/python/tests/routes.py
@@ -9,7 +9,7 @@ from fixtures import *
def test_static_routes(app):
for route in ('/health', '/robots.txt', '/', '/about'):
rv = app.get(route)
- assert rv.status_code == 200
+ rv.raise_for_status()
assert app.get("/static/bogus/route").status_code == 404
@@ -27,16 +27,16 @@ def test_all_views(app):
assert rv.status_code == 404
rv = app.get('/container/aaaaaaaaaaaaaeiraaaaaaaaai')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/container/aaaaaaaaaaaaaeiraaaaaaaaai/history')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/container/aaaaaaaaaaaaaeiraaaaaaaaai/edit')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/container/create')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/container/lookup')
assert rv.status_code == 400
@@ -48,34 +48,34 @@ def test_all_views(app):
assert rv.status_code == 302
rv = app.get('/creator/aaaaaaaaaaaaaircaaaaaaaaai')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/creator/aaaaaaaaaaaaaircaaaaaaaaai/history')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/creator/aaaaaaaaaaaaaircaaaaaaaaai/edit')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/creator/lookup?orcid=0000-0003-2088-7465')
assert rv.status_code == 302
rv = app.get('/file/aaaaaaaaaaaaamztaaaaaaaaai')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/file/lookup?sha1=7d97e98f8af710c7e7fe703abc8f639e0ee507c4')
assert rv.status_code == 302
rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai/history')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/release/aaaaaaaaaaaaarceaaaaaaaaai/edit')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/release/create')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/release/lookup?doi=10.123/abc')
assert rv.status_code == 302
@@ -84,22 +84,22 @@ def test_all_views(app):
assert rv.status_code == 302
rv = app.get('/release/search')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/work/aaaaaaaaaaaaavkvaaaaaaaaai')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/work/aaaaaaaaaaaaavkvaaaaaaaaai/history')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/work/aaaaaaaaaaaaavkvaaaaaaaaai/edit')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/work/create')
assert rv.status_code == 404
rv = app.get('/editgroup/aaaaaaaaaaaabo53aaaaaaaaae')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/editgroup/ccccccccccccccccccccccccca')
print(rv)
@@ -110,7 +110,7 @@ def test_all_views(app):
#assert rv.status_code == 302
rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae')
- assert rv.status_code == 200
+ rv.raise_for_status()
rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae/changelog')
- assert rv.status_code == 200
+ rv.raise_for_status()