test_certify.py 467 B

123456789101112131415161718
  1. import os
  2. import unittest
  3. import certifi
  4. class TestCertifi(unittest.TestCase):
  5. def test_cabundle_exists(self) -> None:
  6. assert os.path.exists(certifi.where())
  7. def test_read_contents(self) -> None:
  8. content = certifi.contents()
  9. assert "-----BEGIN CERTIFICATE-----" in content
  10. def test_py_typed_exists(self) -> None:
  11. assert os.path.exists(
  12. os.path.join(os.path.dirname(certifi.__file__), 'py.typed')
  13. )