Back to index

python3.2  3.2.2
Public Member Functions
test.test_urllib2net.OtherNetworkTests Class Reference

List of all members.

Public Member Functions

def setUp
def test_ftp
def test_file

Detailed Description

Definition at line 93 of file test_urllib2net.py.


Member Function Documentation

Definition at line 94 of file test_urllib2net.py.

00094 
00095     def setUp(self):
00096         if 0:  # for debugging
00097             import logging
00098             logger = logging.getLogger("test_urllib2net")
00099             logger.addHandler(logging.StreamHandler())

Here is the caller graph for this function:

Definition at line 113 of file test_urllib2net.py.

00113 
00114     def test_file(self):
00115         TESTFN = support.TESTFN
00116         f = open(TESTFN, 'w')
00117         try:
00118             f.write('hi there\n')
00119             f.close()
00120             urls = [
00121                 'file:' + sanepathname2url(os.path.abspath(TESTFN)),
00122                 ('file:///nonsensename/etc/passwd', None,
00123                  urllib.error.URLError),
00124                 ]
00125             self._test_urls(urls, self._extra_handlers(), retry=True)
00126         finally:
00127             os.remove(TESTFN)

Here is the call graph for this function:

Definition at line 103 of file test_urllib2net.py.

00103 
00104     def test_ftp(self):
00105         urls = [
00106             'ftp://ftp.kernel.org/pub/linux/kernel/README',
00107             'ftp://ftp.kernel.org/pub/linux/kernel/non-existent-file',
00108             #'ftp://ftp.kernel.org/pub/leenox/kernel/test',
00109             'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC'
00110                 '/research-reports/00README-Legal-Rules-Regs',
00111             ]
00112         self._test_urls(urls, self._extra_handlers())


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