Add test for HTTP default port 80 in https_check#268
Merged
jsf9k merged 4 commits intoJun 24, 2026
Conversation
Follow-up to #267, which also added the http -> port 80 default. This covers that branch, mirroring the existing port 443 test. Signed-off-by: arpitjain099 <arpitjain099@gmail.com>
This reduces repeated code.
This library contains a py.typed file and type hints, but that doesn't appear to be sufficient for mypy.
Member
|
@arpitjain099 - Please let me know what you think of commits d659b65 and 01f6a13. |
jsf9k
approved these changes
Jun 23, 2026
dav3r
approved these changes
Jun 23, 2026
dav3r
left a comment
Member
There was a problem hiding this comment.
LGTM, aside from the test name comment I mentioned. 👍
Co-authored-by: dav3r <daver@geekpad.com>
Contributor
Author
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.
Follow-up to #267. @dav3r noted that #267 also added the
http-> port 80 default but only the port 443 and explicit-port cases had tests, and it auto-merged before that could be addressed. This addstest_http_check_defaults_to_port_80to cover the remaining branch.It mirrors the existing
test_https_check_defaults_to_port_443test, just with an http endpoint and port 80.Note: I couldn't run the suite locally (sslyze's nassl native lib won't load on my macOS), but I verified the logic directly:
Endpoint("http", "root", "example.com").urlishttp://example.com, and the port parse inhttps_checkreturns 80 for an http URL with no explicit port. CI should exercise the full test on Linux like its siblings.