Test cookie.path_specified == False #245
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@kmike I’m extremely unsure about this change, I have no idea of the side effects it may have.
I am trying to add test coverage to https://codecov.io/gh/scrapy-plugins/scrapy-splash/src/master/scrapy_splash/cookies.py#L111
This change adds such coverage, and ensures that
cookie_to_har(har_to_cookie(har_cookie)) == har_cookie
works if no path is specified.On the other hand, setting
/
as a default path comes from Requests, where it’s still used. Their implementation does have a difference that we lost when we simplified our code: they setpath='/'
if thepath
parameter is not received, but ifpath=None
is received thatNone
value is used instead; but I’m not sure if that is relevant to our use case, and it would not makecookie_to_har(har_to_cookie(har_cookie)) == har_cookie
work either.