Back to index

python3.2  3.2.2
Public Member Functions
test.test_smtpd.SMTPDServerTest Class Reference
Inheritance diagram for test.test_smtpd.SMTPDServerTest:
Inheritance graph
[legend]
Collaboration diagram for test.test_smtpd.SMTPDServerTest:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def test_process_message_unimplemented
def tearDown

Detailed Description

Definition at line 29 of file test_smtpd.py.


Member Function Documentation

Definition at line 30 of file test_smtpd.py.

00030 
00031     def setUp(self):
00032         smtpd.socket = asyncore.socket = mock_socket

Here is the caller graph for this function:

Definition at line 47 of file test_smtpd.py.

00047 
00048     def tearDown(self):
00049         asyncore.close_all()
00050         asyncore.socket = smtpd.socket = socket
00051 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 33 of file test_smtpd.py.

00033 
00034     def test_process_message_unimplemented(self):
00035         server = smtpd.SMTPServer('a', 'b')
00036         conn, addr = server.accept()
00037         channel = smtpd.SMTPChannel(server, conn, addr)
00038 
00039         def write_line(line):
00040             channel.socket.queue_recv(line)
00041             channel.handle_read()
00042 
00043         write_line(b'MAIL From:eggs@example')
00044         write_line(b'RCPT To:spam@example')
00045         write_line(b'DATA')
00046         self.assertRaises(NotImplementedError, write_line, b'spam\r\n.\r\n')

Here is the call graph for this function:


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