Changeset 1843:80e8e9872c20


Ignore:
Timestamp:
Jul 11, 2019, 10:20:42 PM (3 months ago)
Author:
Stefan Schwarzer <sschwarzer@…>
Branch:
default
Message:
Make `session_factory` mandatory

With the switch to the "scripted session" approach, we always need
the factory for mocking.

Without the previous default value for `session_factory`, we no
longer need to import `mock_ftplib`.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/test_base.py

    r1795 r1843  
    66
    77import ftputil
    8 
    9 from test import mock_ftplib
    108
    119
     
    2321# Factory to produce `FTPHost`-like classes from a given `FTPHost`
    2422# class and (usually) a given `MockSession` class.
    25 def ftp_host_factory(session_factory=mock_ftplib.MockUnixFormatSession,
     23def ftp_host_factory(session_factory,
    2624                     ftp_host_class=ftputil.FTPHost):
    2725    return ftp_host_class("dummy_host", "dummy_user", "dummy_password",
Note: See TracChangeset for help on using the changeset viewer.