source: test/ @ 1712:1b17d07f3a88

Last change on this file since 1712:1b17d07f3a88 was 1564:c5b353a1c23d, checked in by Stefan Schwarzer <sschwarzer@…>, 7 years ago
List contributors in `doc/contributors.txt`. So far, individual files had copyright notices for contributors. However, this makes it difficult to properly adapt files in case of refactoring: If a piece of code is moved to another file, I would need to find out if this code was contributed by someone else and change the copyright notice in the target file accordingly. With the new approach, every file refers to the file `doc/contributors.txt`, which contains the names of contributors.
File size: 636 bytes
1# Copyright (C) 2003-2013, Stefan Schwarzer <>
2# and ftputil contributors (see `doc/contributors.txt`)
3# See the file LICENSE for licensing terms.
5from __future__ import unicode_literals
7import ftputil
9from test import mock_ftplib
12# Factory to produce `FTPHost`-like classes from a given `FTPHost`
13# class and (usually) a given `MockSession` class.
14def ftp_host_factory(session_factory=mock_ftplib.MockUnixFormatSession,
15                     ftp_host_class=ftputil.FTPHost):
16    return ftp_host_class("dummy_host", "dummy_user", "dummy_password",
17                          session_factory=session_factory)
Note: See TracBrowser for help on using the repository browser.