mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-23 07:46:23 -04: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')
|
@main.route('/services/<uuid:service_id>/agreement.pdf')
|
||||||
@user_has_permissions('manage_service')
|
@user_has_permissions('manage_service')
|
||||||
def service_download_agreement(service_id):
|
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'])
|
@main.route('/services/<uuid:service_id>/agreement/accept', methods=['GET', 'POST'])
|
||||||
@@ -88,8 +87,7 @@ def public_agreement(variant):
|
|||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
if request.endpoint == 'main.public_download_agreement':
|
if request.endpoint == 'main.public_download_agreement':
|
||||||
return send_file(**get_mou(
|
return send_file(**get_mou())
|
||||||
))
|
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
'views/agreement/agreement-public.html',
|
'views/agreement/agreement-public.html',
|
||||||
|
|||||||
@@ -469,6 +469,4 @@ def organisation_billing(org_id):
|
|||||||
@main.route('/organisations/<uuid:org_id>/agreement.pdf')
|
@main.route('/organisations/<uuid:org_id>/agreement.pdf')
|
||||||
@user_is_platform_admin
|
@user_is_platform_admin
|
||||||
def organisation_download_agreement(org_id):
|
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():
|
def get_mou():
|
||||||
bucket = current_app.config['MOU_BUCKET_NAME']
|
bucket = current_app.config['MOU_BUCKET_NAME']
|
||||||
filename = 'agreement.pdf'
|
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:
|
try:
|
||||||
key = get_s3_object(bucket, filename)
|
key = get_s3_object(bucket, filename)
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -263,6 +263,7 @@
|
|||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hide the inverted logo when printing in browsers that don't support SVG.
|
||||||
.govuk-header__logotype-fallback-image {
|
.govuk-header__logotype-fallback-image {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -142,7 +142,6 @@ def test_download_service_agreement(
|
|||||||
'attachment; filename="{}"'.format(expected_file_served)
|
'attachment; filename="{}"'.format(expected_file_served)
|
||||||
)
|
)
|
||||||
mock_get_s3_object.assert_called_once()
|
mock_get_s3_object.assert_called_once()
|
||||||
# mock_get_s3_object.assert_called_once_with('test-mou', expected_file_fetched)
|
|
||||||
else:
|
else:
|
||||||
assert not expected_file_fetched
|
assert not expected_file_fetched
|
||||||
assert mock_get_s3_object.called is False
|
assert mock_get_s3_object.called is False
|
||||||
|
|||||||
Reference in New Issue
Block a user