source: test/ @ 1563:2a46cd8e2ea6

Last change on this file since 1563:2a46cd8e2ea6 was 1343:bcadc5b1504f, checked in by Stefan Schwarzer <sschwarzer@…>, 6 years ago
Use double quotes (") for strings. I used to have a rule to put "identifier-like" strings in single quotes (') and other strings in double quotes. For example, dictionary keys would usually be in single quotes, but error messages in double quotes. Unfortunately, there are many border cases, so over time I've become tired of thinking about when I should use one kind of quotes or the other. So everything is in double quotes now. Also, I guess most people are rather used to double quotes for strings and thus will welcome the change. :-)
File size: 580 bytes
1# Copyright (C) 2003-2013, Stefan Schwarzer <>
2# See the file LICENSE for licensing terms.
4from __future__ import unicode_literals
6import ftputil
8from test import mock_ftplib
11# Factory to produce `FTPHost`-like classes from a given `FTPHost`
12# class and (usually) a given `MockSession` class.
13def ftp_host_factory(session_factory=mock_ftplib.MockUnixFormatSession,
14                     ftp_host_class=ftputil.FTPHost):
15    return ftp_host_class("dummy_host", "dummy_user", "dummy_password",
16                          session_factory=session_factory)
Note: See TracBrowser for help on using the repository browser.