-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AYR-1386 - File download timeout #712
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #712 +/- ##
===========================================
- Coverage 94.29% 58.55% -35.74%
===========================================
Files 20 8 -12
Lines 1174 263 -911
===========================================
- Hits 1107 154 -953
- Misses 67 109 +42 ☔ View full report in Codecov by Sentry. |
And the file should contain the expected content | ||
And the downloaded filename should be the File's CiteableReference with extension | ||
""" | ||
""" """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function name for this pretty clear, I still think that having a docstring here would be useful.
And the file should contain the expected content | ||
And the downloaded filename should be the filename with extension | ||
""" | ||
""" """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here for the docstring.
abort(500) | ||
|
||
content_type = s3_file_object.get("ContentType", "application/octet-stream") | ||
|
||
if render: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition block was already redundant anyway wasn't in, since we moved render to use presigned urls directly.
@@ -38,17 +38,10 @@ def test_invalid_id_raises_404(self, client: FlaskClient): | |||
assert response.status_code == 404 | |||
|
|||
@mock_aws | |||
def test_download_record_standard_user_with_citable_reference_with_file_extension( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we still need the test cases for citable_reference_with_file_extension
and citable_reference_without_file_extension
unless we move the logic for the downloaded_filename into a helper function and test that
Changes in this PR
JIRA ticket
https://national-archives.atlassian.net/browse/AYR-1386