Skip to content

test: add two more tests exercising the adapter#6936

Merged
sigmavirus24 merged 3 commits intopsf:mainfrom
allrob23:main
May 3, 2025
Merged

test: add two more tests exercising the adapter#6936
sigmavirus24 merged 3 commits intopsf:mainfrom
allrob23:main

Conversation

@allrob23
Copy link
Copy Markdown
Contributor

This PR adds two test cases for Session.mount() to cover the documentation's recommendation about trailing slashes in prefixes (see #6935).

The first test test_session_get_adapter_prefix_with_trailing_slash verifies that prefixes with a trailing / (e.g., https://example.com/) match only the intended hostname.

The second test test_session_get_adapter_prefix_without_trailing_slash verifies that prefixes without a trailing / (e.g., https://example.com) match both the intended hostname and extended hostnames (e.g., https://example.com.other.com), as warned in the docs.

Together, these tests ensure the longest prefix match behavior is well-documented and stable.

@allrob23
Copy link
Copy Markdown
Contributor Author

I don't think the error in ci is related to my modification, could someone help?

@allrob23
Copy link
Copy Markdown
Contributor Author

about the lint, I opened another PR #6937 to solve it

@sigmavirus24
Copy link
Copy Markdown
Contributor

Please rebase this on the latest HEAD of main. This will pull in your fix for the lint action

@allrob23
Copy link
Copy Markdown
Contributor Author

@sigmavirus24 is it fine? I don't know about the ci fail in 3.9 windows

@sigmavirus24
Copy link
Copy Markdown
Contributor

@allrob23 yes, we dropped pypy 3.9 so this looks good to me

@sigmavirus24 sigmavirus24 merged commit c65c780 into psf:main May 3, 2025
29 of 30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants