-
Notifications
You must be signed in to change notification settings - Fork 360
Fixed a bug which caused allow_redirects to be listed twice in python requests #74
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
Fixed a bug which caused allow_redirects to be listed twice in python requests #74
Conversation
…ted twice when follow redirect options is set to false
|
@@ -110,7 +110,6 @@ self = module.exports = { | |||
', data = payload, files = files' : ', data = payload'; | |||
snippet += !options.followRedirect ? ', allow_redirects=False' : ''; |
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.
Leave space behind and after =
in allow_redirects=False
in generated python code. as we are doing the same in other places. i.e data = payload
and files = files
.
Also update test according to it.
expect.fail(null, null, err); | ||
} | ||
expect(snippet).to.be.a('string'); | ||
expect(snippet).to.not.include('allow_redirects=False, allow_redirects=false'); |
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.
If options.requestTimeout !== 0
is true than this will be not valid as generated snippet will have allow_redirects=False, timeout=${options.requestTimeout}, allow_redirects=false
.
…ween the two allow_redirects
This PR fixes #73