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.
def patchUserDatabase(patch, user, uid, group, gid):

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.

ParameterspatchA function like TestCase.patch which will be used to install the fake implementations.
userThe name of the single user which will exist. (type: str)
uidThe UID of the single user which will exist. (type: int)
groupThe name of the single user which will exist. (type: str)
gidThe GID of the single group which will exist. (type: int)
def _patchTextFileLogObserver(patch):

Patch logger.textFileLogObserver to record every call and keep a reference to the passed log file for tests.

Parameterspatcha callback for patching (usually unittest.TestCase.patch).
Returnsthe list that keeps track of the log files. (type: list)
def _setupSyslog(testCase):

Make fake syslog, and return list to which prefix and then log messages will be appended if it is used.

def stubApplicationRunnerFactoryCreator(signum):

Create a factory function to instantiate a StubApplicationRunnerWithSignal that will report signum as the captured signal..

ParameterssignumThe integer signal number or None (type: int or None)
ReturnsA factory function to create stub runners. (type: stubApplicationRunnerFactory)
API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.