Changeset 1142:30f2f124324b


Ignore:
Timestamp:
Dec 28, 2012, 11:33:42 AM (7 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Renamed `MockUnixSession` to `MockUnixFormatSession`.

This is analogous to `MockMSFormatSession`. After all, we can have
servers running on a Microsoft system which emit Unix-style directory
listings.
Location:
test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • test/mock_ftplib.py

    r1140 r1142  
    179179
    180180
    181 class MockUnixSession(MockSession):
     181class MockUnixFormatSession(MockSession):
    182182
    183183    dir_contents = {
  • test/test_base.py

    r1140 r1142  
    99# Factory to produce `FTPHost`-like classes from a given `FTPHost`
    1010# class and (usually) a given `MockSession` class.
    11 def ftp_host_factory(session_factory=mock_ftplib.MockUnixSession,
     11def ftp_host_factory(session_factory=mock_ftplib.MockUnixFormatSession,
    1212                     ftp_host_class=ftputil.FTPHost):
    1313    return ftp_host_class('dummy_host', 'dummy_user', 'dummy_password',
  • test/test_ftp_stat.py

    r1140 r1142  
    270270        # Most tests in this class need the mock session class with
    271271        # Unix format, so make this the default. Tests which need
    272         # the MS format, can overwrite `self.stat` later.
    273         self.stat = test_stat(session_factory=mock_ftplib.MockUnixSession)
     272        # the MS format can overwrite `self.stat` later.
     273        self.stat = test_stat(
     274                    session_factory=mock_ftplib.MockUnixFormatSession)
    274275
    275276    def test_failing_lstat(self):
     
    401402
    402403    def setUp(self):
    403         self.stat = test_stat(session_factory=mock_ftplib.MockUnixSession)
     404        self.stat = test_stat(
     405                    session_factory=mock_ftplib.MockUnixFormatSession)
    404406
    405407    def test_failing_listdir(self):
  • test/test_ftputil.py

    r1141 r1142  
    9999
    100100
    101 class BinaryDownloadMockSession(mock_ftplib.MockUnixSession):
     101class BinaryDownloadMockSession(mock_ftplib.MockUnixFormatSession):
    102102    mock_file_content = binary_data()
    103103
Note: See TracChangeset for help on using the changeset viewer.