make sure static subdir 404s correctly

before each request, we put the current service on the flask session,
except for with the static folder, cos it's not needed.... except, if
we 404, then we return the 404 template, which checks if you're logged
in or not to display different nav bar items. This was crashing when
current_service wasn't set, so we now set it.

also cleaned up some imports and stuff in test files
This commit is contained in:
Leo Hemsted
2017-05-04 11:28:45 +01:00
parent 50e4a8a50c
commit d6de5508ca
6 changed files with 14 additions and 21 deletions

View File

@@ -1,4 +1,3 @@
import json
from flask import url_for
@@ -54,7 +53,6 @@ def test_view_template_versions(
):
service_id = fake_uuid
template_id = fake_uuid
version = 1
resp = logged_in_client.get(url_for(
'.view_template_versions',
service_id=service_id,