Skip to content

Stop abusing pytest-httpbin to test commonName support#5869

Merged
sethmlarson merged 1 commit intopsf:masterfrom
pquentin:nosan-server
Jul 12, 2021
Merged

Stop abusing pytest-httpbin to test commonName support#5869
sethmlarson merged 1 commit intopsf:masterfrom
pquentin:nosan-server

Conversation

@pquentin
Copy link
Contributor

@pquentin pquentin commented Jul 12, 2021

pytest-httpbin<1.0 ships with a server certificate with a commonName but
no subjectAltName. urllib3 2.0 will stop supporting those in the future,
so we want to upgrade pytest-httpbin.

Unfortunately, test_https_warnings was relying on this broken
certificate. With this change, we use trustme to create a broken
certificate specifically for this test, so that we can upgrade
pytest-httpbin and make sure that other tests relying on httpbin TLS
support will continue to work with urllib3 2.0.

Closes #5530

pytest-httpbin<1.0 ships with a server certificate with a commonName but
no subjectAltName. urllib3 2.0 will stop supporting those in the future,
so we want to upgrade pytest-httpbin.

Unfortunately, `test_https_warnings` was relying on this broken
certificate. With this change, we use `trustme` to create a broken
certificate specifically for this test, so that we can upgrade
pytest-httpbin and make sure that other tests relying on httpbin TLS
support will continue to work with urllib3 2.0.
@pquentin
Copy link
Contributor Author

You can see the tests passing in my fork: https://github.com/pquentin/requests/actions/runs/1021954813

Copy link
Member

@sethmlarson sethmlarson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sethmlarson sethmlarson merged commit e253eba into psf:master Jul 12, 2021
@pquentin pquentin deleted the nosan-server branch July 13, 2021 06:35
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test test_https_warnings is not functional with pytest-httpbin 1.0

2 participants