source: test/test_base.py @ 1564:c5b353a1c23d

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