(host, port)
| 13 | SMTP_TEST_SERVER = os.getenv('CPYTHON_TEST_SMTP_SERVER', 'smtp.gmail.com') |
| 14 | |
| 15 | def check_ssl_verifiy(host, port): |
| 16 | context = ssl.create_default_context() |
| 17 | with socket.create_connection((host, port)) as sock: |
| 18 | try: |
| 19 | sock = context.wrap_socket(sock, server_hostname=host) |
| 20 | except Exception: |
| 21 | return False |
| 22 | else: |
| 23 | sock.close() |
| 24 | return True |
| 25 | |
| 26 | |
| 27 | class SmtpTest(unittest.TestCase): |
no test coverage detected
searching dependent graphs…