cheroot.test.ssl.test_ssl_builtin module#

Tests for cheroot.ssl.builtin.

cheroot.test.ssl.test_ssl_builtin.test_builtin_adapter_client_cert_no_verification(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker)#

Test that client cert environ is not populated when verification is disabled.

cheroot.test.ssl.test_ssl_builtin.test_builtin_adapter_get_server_cert_environ_invalid_file(tls_certificate_private_key_pem_path)#

Test that _get_server_cert_environ handles invalid cert file gracefully.

cheroot.test.ssl.test_ssl_builtin.test_builtin_adapter_get_server_cert_environ_no_cert(tls_certificate_private_key_pem_path)#

Test that _get_server_cert_environ returns empty dict when no certificate.

cheroot.test.ssl.test_ssl_builtin.test_builtin_create_ssl_socket_error(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker)#

Test that wrap_socket errors are caught and converted to FatalSSLAlert.

cheroot.test.ssl.test_ssl_builtin.test_builtin_handshake_error_handling(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker, error_class, error_msg, expected_exception, match_text)#

Test various error conditions during builtin SSL handshake.

cheroot.test.ssl.test_ssl_builtin.test_builtin_handshake_timeout(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker)#

Test that handshake times out on repeated WantRead errors.

cheroot.test.ssl.test_ssl_builtin.test_full_builtin_environ_population(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker)#

Test that builtin adapter populates all SSL environ variables correctly.

cheroot.test.ssl.test_ssl_builtin.test_streamreader_with_tls_and_regular_sockets(mocker)#

Test StreamReader works with both TLSSocket and regular sockets.

cheroot.test.ssl.test_ssl_builtin.test_streamwriter_with_tls_and_regular_sockets(mocker)#

Test StreamWriter works with both TLSSocket and regular sockets.

cheroot.test.ssl.test_ssl_builtin.test_wrap_with_builtin_ssl_wrap_fails(tls_certificate_pem_path, tls_certificate_private_key_pem_path, mocker)#

Test that SSL wrap_socket error raises FatalSSLAlert.