Repository navigation
Add tests for uncovered branches in multipart, cookies, auth, and responses - #3885
Open
sohams5002 wants to merge 4 commits into
Open
sohams5002 wants to merge 4 commits into
sohams5002 wants to merge 4 commits into
Conversation
Add tests for clearing cookies and domain/path mismatches.
Add test to verify that response text is cached after first access.
Add test for DigestAuth handling 401 response without opaque.
This branch has not been deployed
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.
Adds five small tests that close uncovered branches found while running the test suite with branch coverage (
coverage run --branch):test_multipart_header_without_boundarynow also covers a baremultipart/form-datacontent-type header with no parameters at all (_multipart.py63->67).test_cookies_get_with_mismatched_domain_or_path:Cookies.get()skips a cookie whose name matches but whose domain or path does not (_models.py1157->1155, 1158->1155).test_cookies_clear:Cookies.clear()with no arguments removes all cookies (_models.py1198->1200).test_response_text_is_cached: reading.texta second time returns the cached value (_models.py643->650).test_digest_auth_with_401_no_opaque: a digest challenge without anopaqueparameter produces a digest without anopaquefield (_auth.py294->296).Full test suite passes locally (1421 passed, 1 skipped), and
ruff format --check,ruff checkandmypyare clean on the touched files.