source: python/trunk/Lib/test/test_smtpnet.py

Last change on this file was 391, checked in by dmik, 11 years ago

python: Merge vendor 2.7.6 to trunk.

  • Property svn:eol-style set to native
File size: 841 bytes
Line 
1#!/usr/bin/env python
2
3import unittest
4from test import test_support
5import smtplib
6
7test_support.requires("network")
8
9class SmtpSSLTest(unittest.TestCase):
10 testServer = 'smtp.gmail.com'
11 remotePort = 465
12
13 def test_connect(self):
14 test_support.get_attribute(smtplib, 'SMTP_SSL')
15 with test_support.transient_internet(self.testServer):
16 server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
17 server.ehlo()
18 server.quit()
19
20 def test_connect_default_port(self):
21 test_support.get_attribute(smtplib, 'SMTP_SSL')
22 with test_support.transient_internet(self.testServer):
23 server = smtplib.SMTP_SSL(self.testServer)
24 server.ehlo()
25 server.quit()
26
27def test_main():
28 test_support.run_unittest(SmtpSSLTest)
29
30if __name__ == "__main__":
31 test_main()
Note: See TracBrowser for help on using the repository browser.