Back to index

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

List of all members.

Public Member Functions

def assertOK
def setUp
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 161 of file test_poplib.py.


Member Function Documentation

def test.test_poplib.TestPOP3Class.assertOK (   self,
  resp 
)

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 in test.test_poplib.TestPOP3_SSLClass.

Definition at line 165 of file test_poplib.py.

00165 
00166     def setUp(self):
00167         self.server = DummyPOP3Server((HOST, PORT))
00168         self.server.start()
00169         self.client = poplib.POP3(self.server.host, self.server.port)

Here is the caller graph for this function:

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 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 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:

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:

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:

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:

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:

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:

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:

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:

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 

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 in test.test_poplib.TestPOP3_SSLClass.

Definition at line 168 of file test_poplib.py.

Reimplemented in test.test_poplib.TestPOP3_SSLClass.

Definition at line 166 of file test_poplib.py.


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