Skip to content
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 no chunked attr #151

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Fix no chunked attr #151

wants to merge 8 commits into from

Conversation

elnuno
Copy link
Contributor

@elnuno elnuno commented Apr 11, 2017

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.

cacheable_methods=None):
if hasattr(response, 'chunked'):
pytest.skip('Requests is new enough, test makes no sense.')
# delattr(response, 'chunked')
Copy link
Contributor

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.')
Copy link
Contributor

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')
Copy link
Contributor

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! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants