Test cookie.path_specified == False#245
Open
Gallaecio wants to merge 1 commit intoscrapy-plugins:masterfrom
Open
Test cookie.path_specified == False#245Gallaecio wants to merge 1 commit intoscrapy-plugins:masterfrom
Gallaecio wants to merge 1 commit intoscrapy-plugins:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #245 +/- ##
==========================================
+ Coverage 92.67% 92.84% +0.17%
==========================================
Files 9 9
Lines 587 587
Branches 118 118
==========================================
+ Hits 544 545 +1
Misses 21 21
+ Partials 22 21 -1
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_cookieworks 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 thepathparameter is not received, but ifpath=Noneis received thatNonevalue 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_cookiework either.