-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Fix a bug where result urls were not updated in retry #153
base: main
Are you sure you want to change the base?
Conversation
@@ -56,7 +56,7 @@ def default_request_handler(self, environ, start_response): | |||
status = "200 OK" | |||
response_headers = [ | |||
("Content-type", "text/plain"), | |||
("Content-Disposition", "attachment; filename=testfile_{self.request_number}.txt"), | |||
("Content-Disposition", f"attachment; filename=testfile_{self.request_number}.txt"), |
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.
I assume this was supposed to be an f-string originally? Also useful in the updated test
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 90.23% 90.64% +0.41%
==========================================
Files 5 5
Lines 635 663 +28
==========================================
+ Hits 573 601 +28
Misses 62 62 ☔ View full report in Codecov by Sentry. |
assert ["0", "1", "3", "4", "2"] == [url[-1] for url in f2.urls] | ||
assert "testfile_1.txt" == f2[0].split("/")[-1] | ||
# there are two requests made per file one for size and one download? | ||
# Todo change handler to use path to create name not request call count |
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.
Could either create a different test server or update to the current callback to generate the filename based on the request PATH
so like filename=f'testfile_{environ['PATH']}.txt'
64f4c0b
to
dae981b
Compare
This is actually what prompted #152 but I forgot to implement this basic version after creating the issue, my bad.