source: test/test_base.py @ 1713:f146a1ea66aa

Last change on this file since 1713:f146a1ea66aa was 1713:f146a1ea66aa, checked in by Stefan Schwarzer <sschwarzer@…>, 8 months 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
Line 
1# Copyright (C) 2003-2018, Stefan Schwarzer <sschwarzer@sschwarzer.net>
2# and ftputil contributors (see `doc/contributors.txt`)
3# See the file LICENSE for licensing terms.
4
5import ftputil
6
7from test import mock_ftplib
8
9
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.