mirror of
https://github.com/certbot/certbot.git
synced 2026-01-23 07:20:55 +03:00
crypto_util: test _pyopenssl_load
This commit is contained in:
@@ -212,6 +212,17 @@ class GetSANsFromCSRTest(unittest.TestCase):
|
||||
self.assertEqual(
|
||||
[], self._call(test_util.load_vector('csr-nosans.pem')))
|
||||
|
||||
class PyOpenSslLoaderTest(unittest.TestCase):
|
||||
def test_pyopenssl_load(self):
|
||||
from letsencrypt.crypto_util import _pyopenssl_load
|
||||
|
||||
method_mock = mock.MagicMock()
|
||||
fake_data = "this is test data"
|
||||
fake_types = ('fake loading type',)
|
||||
_pyopenssl_load(fake_data, method_mock, fake_types)
|
||||
method_mock.assert_called_with(fake_types[0], fake_data)
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main() # pragma: no cover
|
||||
|
||||
Reference in New Issue
Block a user