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

@@ -88,7 +88,7 @@ def test_if_cant_send_letters_then_cant_see_letter_contact_block(
assert 'Letter contact block' not in response.get_data(as_text=True)
def test_letter_contact_block_shows_None_if_not_set(
def test_letter_contact_block_shows_none_if_not_set(
logged_in_client,
service_one,
mocker,