Stubouts, mocks and fixtures for the test suite
Common utilities used in testing
Bases: testtools.testcase.TestCase
Override some configuration values.
The keyword arguments are the names of configuration options to override and their values.
If a group argument is supplied, the overrides are applied to the specified configuration option group.
All overrides are automatically cleared at the end of the current test by the fixtures cleanup process.
Bases: object
Bases: object
Bases: object
Decorator to skip test if an executable is unavailable
Executes a command in a subprocess. Returns a tuple of (exitcode, out, err), where out is the string output from stdout and err is the string output from stderr when executing the command.
Parameters: |
|
---|
Searches the path for a given cmdname. Returns an absolute filename if an executable with the given name exists in the path, or None if one does not.
Parameters: | cmdname – The bare name of the executable to search for |
---|
Execute a command using fork/exec.
This is needed for programs system executions that need path searching but cannot have a shell as their parent process, for example: glance-api. When glance-api starts it sets itself as the parent process for its own process group. Thus the pid that a Popen process would have is not the right pid to use for killing the process group. This patch gives the test env direct access to the actual pid.
Parameters: |
|
---|
Returns an unused port on localhost and the open socket from which it was created.
Bases: object
Decorator that initiates additional test setup/teardown.
Decorator that skips a test if test case is disabled.