Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
test.test_poplib.TestPOP3_SSLClass Class Reference
Inheritance diagram for test.test_poplib.TestPOP3_SSLClass:
Inheritance graph
[legend]
Collaboration diagram for test.test_poplib.TestPOP3_SSLClass:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def test__all__
def test_context
def assertOK
def tearDown
def test_getwelcome
def test_exceptions
def test_user
def test_pass_
def test_stat
def test_list
def test_retr
def test_dele
def test_noop
def test_rpop
def test_apop
def test_top
def test_uidl

Public Attributes

 server
 client

Detailed Description

Definition at line 277 of file test_poplib.py.


Member Function Documentation

def test.test_poplib.TestPOP3Class.assertOK (   self,
  resp 
) [inherited]

Definition at line 162 of file test_poplib.py.

00162 
00163     def assertOK(self, resp):
00164         self.assertTrue(resp.startswith(b"+OK"))

Here is the call graph for this function:

Here is the caller graph for this function:

Reimplemented from test.test_poplib.TestPOP3Class.

Definition at line 280 of file test_poplib.py.

00280 
00281         def setUp(self):
00282             self.server = DummyPOP3Server((HOST, PORT))
00283             self.server.handler = DummyPOP3_SSLHandler
00284             self.server.start()
00285             self.client = poplib.POP3_SSL(self.server.host, self.server.port)

Here is the caller graph for this function:

def test.test_poplib.TestPOP3Class.tearDown (   self) [inherited]

Definition at line 170 of file test_poplib.py.

00170 
00171     def tearDown(self):
00172         self.client.quit()
00173         self.server.stop()

Here is the caller graph for this function:

Definition at line 286 of file test_poplib.py.

00286 
00287         def test__all__(self):
00288             self.assertIn('POP3_SSL', poplib.__all__)

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_apop (   self) [inherited]

Definition at line 216 of file test_poplib.py.

00216 
00217     def test_apop(self):
00218         self.assertOK(self.client.apop('foo', 'dummypassword'))

Here is the call graph for this function:

Definition at line 289 of file test_poplib.py.

00289 
00290         def test_context(self):
00291             ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1)
00292             self.assertRaises(ValueError, poplib.POP3_SSL, self.server.host,
00293                               self.server.port, keyfile=CERTFILE, context=ctx)
00294             self.assertRaises(ValueError, poplib.POP3_SSL, self.server.host,
00295                               self.server.port, certfile=CERTFILE, context=ctx)
00296             self.assertRaises(ValueError, poplib.POP3_SSL, self.server.host,
00297                               self.server.port, keyfile=CERTFILE,
00298                               certfile=CERTFILE, context=ctx)
00299 
00300             self.client.quit()
00301             self.client = poplib.POP3_SSL(self.server.host, self.server.port,
00302                                           context=ctx)
00303             self.assertIsInstance(self.client.sock, ssl.SSLSocket)
00304             self.assertIs(self.client.sock.context, ctx)
00305             self.assertTrue(self.client.noop().startswith(b'+OK'))
00306 

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_dele (   self) [inherited]

Definition at line 207 of file test_poplib.py.

00207 
00208     def test_dele(self):
00209         self.assertOK(self.client.dele('foo'))

Here is the call graph for this function:

Definition at line 178 of file test_poplib.py.

00178 
00179     def test_exceptions(self):
00180         self.assertRaises(poplib.error_proto, self.client._shortcmd, 'echo -err')

Here is the call graph for this function:

Definition at line 174 of file test_poplib.py.

00174 
00175     def test_getwelcome(self):
00176         self.assertEqual(self.client.getwelcome(),
00177                          b'+OK dummy pop3 server ready. <timestamp>')

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_list (   self) [inherited]

Definition at line 192 of file test_poplib.py.

00192 
00193     def test_list(self):
00194         self.assertEqual(self.client.list()[1:],
00195                          ([b'1 1', b'2 2', b'3 3', b'4 4', b'5 5'],
00196                           25))
00197         self.assertTrue(self.client.list('1').endswith(b"OK 1 1"))

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_noop (   self) [inherited]

Definition at line 210 of file test_poplib.py.

00210 
00211     def test_noop(self):
00212         self.assertOK(self.client.noop())

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_pass_ (   self) [inherited]

Definition at line 185 of file test_poplib.py.

00185 
00186     def test_pass_(self):
00187         self.assertOK(self.client.pass_('python'))
00188         self.assertRaises(poplib.error_proto, self.client.user, 'invalid')

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_retr (   self) [inherited]

Definition at line 198 of file test_poplib.py.

00198 
00199     def test_retr(self):
00200         expected = (b'+OK 116 bytes',
00201                     [b'From: postmaster@python.org', b'Content-Type: text/plain',
00202                      b'MIME-Version: 1.0', b'Subject: Dummy',
00203                      b'', b'line1', b'line2', b'line3'],
00204                     113)
00205         foo = self.client.retr('foo')
00206         self.assertEqual(foo, expected)

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_rpop (   self) [inherited]

Definition at line 213 of file test_poplib.py.

00213 
00214     def test_rpop(self):
00215         self.assertOK(self.client.rpop('foo'))

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_stat (   self) [inherited]

Definition at line 189 of file test_poplib.py.

00189 
00190     def test_stat(self):
00191         self.assertEqual(self.client.stat(), (10, 100))

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_top (   self) [inherited]

Definition at line 219 of file test_poplib.py.

00219 
00220     def test_top(self):
00221         expected =  (b'+OK 116 bytes',
00222                      [b'From: postmaster@python.org', b'Content-Type: text/plain',
00223                       b'MIME-Version: 1.0', b'Subject: Dummy', b'',
00224                       b'line1', b'line2', b'line3'],
00225                      113)
00226         self.assertEqual(self.client.top(1, 1), expected)

Here is the call graph for this function:

def test.test_poplib.TestPOP3Class.test_uidl (   self) [inherited]

Definition at line 227 of file test_poplib.py.

00227 
00228     def test_uidl(self):
00229         self.client.uidl()
00230         self.client.uidl('foo')
00231 

def test.test_poplib.TestPOP3Class.test_user (   self) [inherited]

Definition at line 181 of file test_poplib.py.

00181 
00182     def test_user(self):
00183         self.assertOK(self.client.user('guido'))
00184         self.assertRaises(poplib.error_proto, self.client.user, 'invalid')

Here is the call graph for this function:


Member Data Documentation

Reimplemented from test.test_poplib.TestPOP3Class.

Definition at line 284 of file test_poplib.py.

Reimplemented from test.test_poplib.TestPOP3Class.

Definition at line 281 of file test_poplib.py.


The documentation for this class was generated from the following file: