aboutsummaryrefslogtreecommitdiffstats
path: root/tests/routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-04-23 16:07:21 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-04-23 16:07:21 -0700
commit5bdd3f6e871599acb339aadc9b78cc12860f9759 (patch)
treee753e48b2becc4806bfbc8d91acb58bd75783534 /tests/routes.py
parentf87a203cd19f777ef328af1576e00dd59025649a (diff)
downloadfatcat-5bdd3f6e871599acb339aadc9b78cc12860f9759.tar.gz
fatcat-5bdd3f6e871599acb339aadc9b78cc12860f9759.zip
skeleton route/views
Diffstat (limited to 'tests/routes.py')
-rw-r--r--tests/routes.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/routes.py b/tests/routes.py
index 47b99e30..194dc865 100644
--- a/tests/routes.py
+++ b/tests/routes.py
@@ -18,3 +18,14 @@ def test_static_routes(rich_app):
assert app.get("/static/bogus/route").status_code == 404
+def test_all_views(rich_app):
+ app = rich_app
+
+ for route in ('work', 'release', 'creator', 'container', 'file'):
+ print(route)
+ rv = app.get('/{}/1'.format(route))
+ assert rv.status_code == 200
+
+ rv = app.get('/v0/work/random')
+ rv = app.get(rv.location)
+ assert rv.status_code == 200