blob: f0f1edd127a189c38a8f4b11fa0c5b1003bb51e2 [file] [log] [blame]
Benjamin Peterson90f5ba52010-03-11 22:53:45 +00001#!/usr/bin/env python3
R. David Murray87e20742009-05-23 01:30:26 +00002
3import unittest
4from test import support
5import smtplib
6
R. David Murrayeccb2ce2009-05-23 02:36:15 +00007support.requires("network")
R. David Murray87e20742009-05-23 01:30:26 +00008
9class SmtpSSLTest(unittest.TestCase):
10 testServer = 'smtp.gmail.com'
11 remotePort = 465
12
13 def test_connect(self):
R. David Murrayeccb2ce2009-05-23 02:36:15 +000014 support.get_attribute(smtplib, 'SMTP_SSL')
Antoine Pitrou6003ff72010-10-13 17:14:16 +000015 with support.transient_internet(self.testServer):
16 server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
R. David Murray87e20742009-05-23 01:30:26 +000017 server.ehlo()
18 server.quit()
19
20def test_main():
21 support.run_unittest(SmtpSSLTest)
22
23if __name__ == "__main__":
24 test_main()