summaryrefslogtreecommitdiffstats
path: root/python/tests/web_routes.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-04-04 15:22:27 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-04-04 15:22:27 -0700
commit86ccea546f93eb74cab7474fe146303d7cb296eb (patch)
tree587e33c0db102a992e2f55f51d8283dc394bdf6d /python/tests/web_routes.py
parent3d992047a83d0668e484700f7077753752adee21 (diff)
downloadfatcat-86ccea546f93eb74cab7474fe146303d7cb296eb.tar.gz
fatcat-86ccea546f93eb74cab7474fe146303d7cb296eb.zip
start improving webface test coverage
Diffstat (limited to 'python/tests/web_routes.py')
-rw-r--r--python/tests/web_routes.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/python/tests/web_routes.py b/python/tests/web_routes.py
new file mode 100644
index 00000000..e6387882
--- /dev/null
+++ b/python/tests/web_routes.py
@@ -0,0 +1,34 @@
+
+import json
+import tempfile
+import pytest
+from fatcat_client.rest import ApiException
+from fixtures import *
+
+
+def test_static_routes(app):
+ for route in ('/health.json', '/robots.txt', '/', '/about'):
+ rv = app.get(route)
+ assert rv.status_code == 200
+
+ assert app.get("/static/bogus/route").status_code == 404
+
+
+def test_all_views(app):
+
+ rv = app.get('/editgroup/aaaaaaaaaaaabo53aaaaaaaaae')
+ assert rv.status_code == 200
+
+ rv = app.get('/editgroup/ccccccccccccccccccccccccca')
+ print(rv)
+ print(rv.data)
+ assert rv.status_code == 404
+
+ #rv = app.get('/editgroup/current')
+ #assert rv.status_code == 302
+
+ rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae')
+ assert rv.status_code == 200
+
+ rv = app.get('/editor/aaaaaaaaaaaabkvkaaaaaaaaae/editgroups')
+ assert rv.status_code == 200