mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-06 03:13:42 -05:00
some code review feedback
This commit is contained in:
@@ -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',
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user