some code review feedback

This commit is contained in:
Kenneth Kehl
2023-04-20 11:32:28 -07:00
parent 1a2bd34ccb
commit ec23f2077f
5 changed files with 5 additions and 10 deletions

View File

@@ -31,8 +31,7 @@ def service_agreement(service_id):
@main.route('/services/<uuid:service_id>/agreement.pdf')
@user_has_permissions('manage_service')
def service_download_agreement(service_id):
return send_file(**get_mou(
))
return send_file(**get_mou())
@main.route('/services/<uuid:service_id>/agreement/accept', methods=['GET', 'POST'])
@@ -88,8 +87,7 @@ def public_agreement(variant):
abort(404)
if request.endpoint == 'main.public_download_agreement':
return send_file(**get_mou(
))
return send_file(**get_mou())
return render_template(
'views/agreement/agreement-public.html',

View File

@@ -469,6 +469,4 @@ def organisation_billing(org_id):
@main.route('/organisations/<uuid:org_id>/agreement.pdf')
@user_is_platform_admin
def organisation_download_agreement(org_id):
return send_file(**get_mou(
))
return send_file(**get_mou())

View File

@@ -7,8 +7,7 @@ from app.s3_client.s3_logo_client import get_s3_object
def get_mou():
bucket = current_app.config['MOU_BUCKET_NAME']
filename = 'agreement.pdf'
attachment_filename = 'U.S. Notify data sharing and financial agreement.pdf'.format(
)
attachment_filename = 'U.S. Notify data sharing and financial agreement.pdf'
try:
key = get_s3_object(bucket, filename)
return {

View File

@@ -263,6 +263,7 @@
background: transparent;
}
// Hide the inverted logo when printing in browsers that don't support SVG.
.govuk-header__logotype-fallback-image {
display: none;
}

View File

@@ -142,7 +142,6 @@ def test_download_service_agreement(
'attachment; filename="{}"'.format(expected_file_served)
)
mock_get_s3_object.assert_called_once()
# mock_get_s3_object.assert_called_once_with('test-mou', expected_file_fetched)
else:
assert not expected_file_fetched
assert mock_get_s3_object.called is False