-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix no chunked attr #151
base: master
Are you sure you want to change the base?
Fix no chunked attr #151
Conversation
cacheable_methods=None): | ||
if hasattr(response, 'chunked'): | ||
pytest.skip('Requests is new enough, test makes no sense.') | ||
# delattr(response, 'chunked') |
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.
Can you remove this comment?
def build_response(self, request, response, from_cache=False, | ||
cacheable_methods=None): | ||
if hasattr(response, 'chunked'): | ||
pytest.skip('Requests is new enough, test makes no sense.') |
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 might reword this as Requests version supports chucked. Skipping this test.
cacheable_methods) | ||
sess = Session() | ||
sess.mount('http://', NoChunked()) | ||
sess.get('http://httpbin.org/cache/60') |
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.
You need to assert something here! :)
I added a simple fix for #137 and a test that will only run on old versions of requests. Sorry about the revert commits, I can squash locally and re-submit if it helps.