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

Test cookie.path_specified == False #245

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Gallaecio
Copy link
Contributor

@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 set path='/' if the path parameter is not received, but if path=None is received that None value is used instead; but I’m not sure if that is relevant to our use case, and it would not make cookie_to_har(har_to_cookie(har_cookie)) == har_cookie work either.

@codecov
Copy link

codecov bot commented Nov 27, 2019

Codecov Report

Merging #245 into master will increase coverage by 0.17%.
The diff coverage is n/a.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
scrapy_splash/cookies.py 100% <ø> (+2.04%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e40ca4f...bd1bfd0. Read the comment docs.

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

Successfully merging this pull request may close these issues.

1 participant