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

@@ -3,7 +3,6 @@ from io import StringIO
from csv import DictReader
import pytest
from freezegun import freeze_time
from app.utils import (
email_safe,
@@ -13,7 +12,7 @@ from app.utils import (
Spreadsheet
)
from tests import notification_json, single_notification_json, template_json
from tests import notification_json, single_notification_json
def _get_notifications_csv(