Changeset 141

Show
Ignore:
Timestamp:
2002-03-30 22:36:31 (7 years ago)
Author:
schwa
Message:
Module: added testcase class TestOpenAndClose.
Files:

Legend:

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

    r140 r141  
    3030# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
    3131 
    32 # $Id: _test_ftputil.py,v 1.50 2002/03/30 22:18:20 schwa Exp $ 
     32# $Id: _test_ftputil.py,v 1.51 2002/03/30 22:36:31 schwa Exp $ 
    3333 
    3434import unittest 
     
    9999# test cases 
    100100# 
     101class TestOpenAndClose(unittest.TestCase): 
     102    """Test opening and closing of FTPHost objects.""" 
     103 
     104    def test_open_and_close(self): 
     105        """Test closing of FTPHost.""" 
     106        host = ftp_host_factory() 
     107        host.close() 
     108        self.assertEqual(host.closed, 1) 
     109        self.assertEqual(host._children, []) 
     110     
     111 
    101112class TestLogin(unittest.TestCase): 
    102     """Test invalid logins.""" 
    103  
     113     
    104114    def test_invalid_login(self): 
    105115        """Login to invalid host must fail."""