Tests for twisted.application.app
and twisted.scripts.twistd
.
Function | patchUserDatabase | Patch pwd.getpwnam
so that it behaves as though only one user exists and patch grp.getgrnam
so that it behaves as though only one group exists. |
Class | MockServiceMaker | A non-implementation of twisted.application.service.IServiceMaker . |
Class | CrippledAppLogger | |
Class | CrippledApplicationRunner | An application runner that cripples the platform-specific runner and nasty side-effect-having code so that we can use it without actually running any environment-affecting code. |
Class | ServerOptionsTests | Non-platform-specific tests for the platform-specific ServerOptions class. |
Class | CheckPIDTests | Tests for checkPID . |
Class | TapFileTests | Test twistd-related functionality that requires a tap file on disk. |
Class | TestLoggerFactory | A logger factory for TestApplicationRunner . |
Class | TestApplicationRunner | An ApplicationRunner which tracks the environment in which its methods are called. |
Class | ApplicationRunnerTests | Non-platform-specific tests for the platform-specific ApplicationRunner. |
Class | UnixApplicationRunnerSetupEnvironmentTests | Tests for UnixApplicationRunner.setupEnvironment . |
Class | UnixApplicationRunnerStartApplicationTests | Tests for UnixApplicationRunner.startApplication . |
Class | UnixApplicationRunnerRemovePIDTests | Tests for UnixApplicationRunner.removePID . |
Class | FakeNonDaemonizingReactor | A dummy reactor, providing beforeDaemonize and
afterDaemonize methods, but not announcing this, and logging
whether the methods have been called. |
Class | FakeDaemonizingReactor | A dummy reactor, providing beforeDaemonize and
afterDaemonize methods, announcing this, and logging whether
the methods have been called. |
Class | DummyReactor | A dummy reactor, only providing a run method and checking
that it has been called. |
Class | AppProfilingTests | Tests for app.AppProfiler . |
Class | AppLoggerTests | Tests for app.AppLogger . |
Class | UnixAppLoggerTests | Tests for UnixAppLogger . |
Class | DaemonizeTests | Tests for _twistd_unix.UnixApplicationRunner
daemonization. |
Class | SignalCapturingMemoryReactor | MemoryReactor that implements the _ISupportsExitSignalCapturing interface, all other operations identical to MemoryReactor. |
Class | StubApplicationRunnerWithSignal | An application runner that uses a SignalCapturingMemoryReactor and has a _signalValue attribute that it will set in the reactor. |
Function | stubApplicationRunnerFactoryCreator | Create a factory function to instantiate a StubApplicationRunnerWithSignal that will report signum as the captured signal.. |
Class | ExitWithSignalTests | Tests for twisted.application.app._exitWithSignal . |
Function | _patchTextFileLogObserver | Patch logger.textFileLogObserver
to record every call and keep a reference to the passed log file for
tests. |
Function | _setupSyslog | Make fake syslog, and return list to which prefix and then log messages will be appended if it is used. |
Patch pwd.getpwnam
so that it behaves as though only one user exists and patch grp.getgrnam
so that it behaves as though only one group exists.
Parameters | patch | A function like TestCase.patch which will be used to install
the fake implementations. |
user | The name of the single user which will exist. (type: str ) | |
uid | The UID of the single user which will exist. (type: int ) | |
group | The name of the single user which will exist. (type: str ) | |
gid | The GID of the single group which will exist. (type: int ) |
Patch logger.textFileLogObserver
to record every call and keep a reference to the passed log file for
tests.
Parameters | patch | a callback for patching (usually unittest.TestCase.patch ). |
Returns | the list that keeps track of the log files. (type: list ) |
Make fake syslog, and return list to which prefix and then log messages will be appended if it is used.
Create a factory function to instantiate a StubApplicationRunnerWithSignal that will report signum as the captured signal..
Parameters | signum | The integer signal number or None (type: int or None ) |
Returns | A factory function to create stub runners. (type: stubApplicationRunnerFactory) |