Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: 8e7c1178a03de3e0bff7b019a56ff9a3493b0929 authored by Benjamin Peterson on 06 March 2010, 20:34:14 UTC
bump version to 2.7a4
Tip revision: 8e7c117
test_smtpnet.py
#!/usr/bin/env python

import unittest
from test import test_support
import smtplib

test_support.requires("network")

class SmtpSSLTest(unittest.TestCase):
    testServer = 'smtp.gmail.com'
    remotePort = 465

    def test_connect(self):
        test_support.get_attribute(smtplib, 'SMTP_SSL')
        server = smtplib.SMTP_SSL(self.testServer, self.remotePort)
        server.ehlo()
        server.quit()

def test_main():
    test_support.run_unittest(SmtpSSLTest)

if __name__ == "__main__":
    test_main()
back to top