-
Notifications
You must be signed in to change notification settings - Fork 253
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
Add 2 basic unit tests #137
Conversation
See https://github.com/bnavigator/python-certifi/runs/991003207 how this will look like in Github Actions |
Would you be able to make those tests a little bit more robust, so they would work even with the modified OpenSUSE package? https://build.opensuse.org/package/show/home:mcepl:branches:devel:languages:python/python-certifi |
The test fail is legit. If there is no
|
Note also the empty /etc/ssl/certs/ in the obs environment. |
https://build.opensuse.org/request/show/850705 It's highly openSUSE specific |
I have slightly improved version of the test script. |
@bnavigator Thanks for taking the time to work on this, and sorry we've been slow to review. I'm going to make a branch off your branch and try to get this merged today! Thanks again. |
See my version of the test script (don’t bother with the authorship of the patch, I release it to public domain). |
Sure, no problem. |
https://build.opensuse.org/request/show/850940 by user dirkmueller + dimstar_suse - update to 2020.11.8: * Python 3.8+ support - Add two-basic-unit-tests.patch which includes two at least simple test patches (gh#certifi/python-certifi#137).
Closes #136
These tests are very basic. They just check that the returned string is really a file and contains the PEM certificate header.
The workflow runs with pytest, but you could also use native
python -m unittest
.Further work could use openssl or the Python module Cryptography to check for valid CA certificates.