source: test/ @ 1718:8bed138bc404

Last change on this file since 1718:8bed138bc404 was 1713:f146a1ea66aa, checked in by Stefan Schwarzer <sschwarzer@…>, 2 years ago
Remove `__future__` imports With the switch to Python 3.x-only, the `__future__` imports are no longer needed. Update copyright years along with the `__future__` import removal.
File size: 595 bytes
1# Copyright (C) 2003-2018, Stefan Schwarzer <>
2# and ftputil contributors (see `doc/contributors.txt`)
3# See the file LICENSE for licensing terms.
5import ftputil
7from test import mock_ftplib
10# Factory to produce `FTPHost`-like classes from a given `FTPHost`
11# class and (usually) a given `MockSession` class.
12def ftp_host_factory(session_factory=mock_ftplib.MockUnixFormatSession,
13                     ftp_host_class=ftputil.FTPHost):
14    return ftp_host_class("dummy_host", "dummy_user", "dummy_password",
15                          session_factory=session_factory)
Note: See TracBrowser for help on using the repository browser.