make file closing more robust
[python/dscho.git] / Lib / test / test_smtpnet.py
blob5b1b38c0f01a5c6d61bcb17a3388cf1258ec67d6
1 #!/usr/bin/env python
3 import unittest
4 from test import support
5 import smtplib
7 support.requires("network")
9 class SmtpSSLTest(unittest.TestCase):
10 testServer = 'smtp.gmail.com'
11 remotePort = 465
13 def test_connect(self):
14 support.get_attribute(smtplib, 'SMTP_SSL')
15 server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
16 server.ehlo()
17 server.quit()
19 def test_main():
20 support.run_unittest(SmtpSSLTest)
22 if __name__ == "__main__":
23 test_main()