Back to index

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

List of all members.

Public Member Functions

def setUp
def tearDown
def test_af
def test_makeport
def test_makepasv
def test_transfer

Public Attributes

 server
 client

Detailed Description

Definition at line 632 of file test_ftplib.py.


Member Function Documentation

Definition at line 634 of file test_ftplib.py.

00634 
00635     def setUp(self):
00636         self.server = DummyFTPServer((HOST, 0), af=socket.AF_INET6)
00637         self.server.start()
00638         self.client = ftplib.FTP()
00639         self.client.connect(self.server.host, self.server.port)

Here is the caller graph for this function:

Definition at line 640 of file test_ftplib.py.

00640 
00641     def tearDown(self):
00642         self.client.close()
00643         self.server.stop()

Here is the caller graph for this function:

Definition at line 644 of file test_ftplib.py.

00644 
00645     def test_af(self):
00646         self.assertEqual(self.client.af, socket.AF_INET6)

Here is the call graph for this function:

Definition at line 652 of file test_ftplib.py.

00652 
00653     def test_makepasv(self):
00654         host, port = self.client.makepasv()
00655         conn = socket.create_connection((host, port), 10)
00656         conn.close()
00657         self.assertEqual(self.server.handler_instance.last_received_cmd, 'epsv')

Here is the call graph for this function:

Definition at line 647 of file test_ftplib.py.

00647 
00648     def test_makeport(self):
00649         with self.client.makeport():
00650             self.assertEqual(self.server.handler_instance.last_received_cmd,
00651                                 'eprt')

Here is the call graph for this function:

Definition at line 658 of file test_ftplib.py.

00658 
00659     def test_transfer(self):
00660         def retr():
00661             def callback(data):
00662                 received.append(data.decode('ascii'))
00663             received = []
00664             self.client.retrbinary('retr', callback)
00665             self.assertEqual(''.join(received), RETR_DATA)
00666         self.client.set_pasv(True)
00667         retr()
00668         self.client.set_pasv(False)
00669         retr()
00670 

Here is the call graph for this function:


Member Data Documentation

Definition at line 637 of file test_ftplib.py.

Definition at line 635 of file test_ftplib.py.


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