Ignore:
Timestamp:
Nov 1, 2015, 10:24:13 PM (4 years ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Make `MockSession.transfercmd` compatible with the session adapter

`ftplib.FTP.transfercmd` takes an optional `rest` argument.
`test.mock_ftplib.MockSession` also defines a `transfercmd` to be
used for unit tests, but this method didn't accept a `rest` argument
because this isn't used by ftputil. This argument is added now, so
that `MockSession.transfercmd` can be called from the session factory
adaptor.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/mock_ftplib.py

    r1564 r1602  
    180180        return "2xx"
    181181
    182     def transfercmd(self, cmd):
     182    def transfercmd(self, cmd, rest=None):
    183183        """
    184184        Return a `MockSocket` object whose `makefile` method will
Note: See TracChangeset for help on using the changeset viewer.