Skip to content

test: add two more tests exercising the adapter #6936

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

allrob23
Copy link
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
Contributor Author

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

@allrob23
Copy link
Contributor Author

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

@sigmavirus24
Copy link
Contributor

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

@allrob23
Copy link
Contributor Author

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

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