From bc7deebcc7f8530c7061f9d7a56a3dd3789addce Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 20 Jan 2020 15:46:03 +0000 Subject: [PATCH] Split test in two for readability --- tests/app/main/views/test_index.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 191820595..38c12b34d 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -257,18 +257,23 @@ def test_letter_template_preview_headers( def test_letter_spec_redirect(client_request): - expected_url = ( - 'https://docs.notifications.service.gov.uk' - '/documentation/images/notify-pdf-letter-spec-v2.4.pdf' - ) client_request.get( 'main.letter_spec', _expected_status=302, - _expected_redirect=expected_url, + _expected_redirect=( + 'https://docs.notifications.service.gov.uk' + '/documentation/images/notify-pdf-letter-spec-v2.4.pdf' + ), ) + + +def test_letter_spec_redirect_with_non_logged_in_user(client_request): client_request.logout() client_request.get( 'main.letter_spec', _expected_status=302, - _expected_redirect=expected_url, + _expected_redirect=( + 'https://docs.notifications.service.gov.uk' + '/documentation/images/notify-pdf-letter-spec-v2.4.pdf' + ), )