Changeset 153

Show
Ignore:
Timestamp:
2002-04-01 13:05:04 (7 years ago)
Author:
schwa
Message:
MockFile: extended docstring a bit.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/_mock_ftplib.py

    r149 r153  
    3030# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3131 
    32 # $Id: _mock_ftplib.py,v 1.16 2002/03/31 23:17:26 schwa Exp $ 
     32# $Id: _mock_ftplib.py,v 1.17 2002/04/01 13:05:04 schwa Exp $ 
    3333 
    3434""" 
     
    5353    return mock_files[path].getvalue() 
    5454 
     55 
    5556class MockFile(StringIO.StringIO): 
    5657    """ 
    5758    Mock class for the file objects _contained in_ _FTPFile 
    58     objects (not for _FTPFile objects themselves!). 
     59    objects (not _FTPFile objects themselves!). 
     60 
     61    Unless StringIO.StringIO instances, MockFile objects can be 
     62    queried for their contents after been closed. 
    5963    """ 
    6064    def __init__(self, path, content=''): 
     
    7478        StringIO.StringIO.close(self) 
    7579 
    76      
     80 
    7781class MockSocket: 
    7882    """ 
     
    100104    # used by MockSession.cwd and MockSession.pwd 
    101105    current_dir = '/home/sschwarzer' 
    102      
     106 
    103107    # used by MockSession.dir 
    104108    dir_contents = { 
     
    121125    # file content to be used (indirectly) with transfercmd 
    122126    mock_file_content = '' 
    123      
     127 
    124128    def __init__(self, host='', user='', password=''): 
    125129        self.closed = 0 
     
    132136            path = path[:-1] 
    133137        return path 
    134          
     138 
    135139    def voidcmd(self, cmd): 
    136140        if DEBUG: