Test Fixture¶
-
class
oslo_config.fixture.Config(conf=<oslo_config.cfg.ConfigOpts object>)¶ Allows overriding configuration settings for the test.
conf will be reset on cleanup.
-
config(**kw)¶ Override 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, otherwise the overrides are applied to the
defaultgroup.
-
register_cli_opt(opt, group=None)¶ Register a single CLI option for the test run.
Options registered in this manner will automatically be unregistered during cleanup.
If a group argument is supplied, it will register the new option to that group, otherwise the option is registered to the
defaultgroup.CLI options must be registered before the command line and config files are parsed. This is to ensure that all CLI options are shown in –help and option validation works as expected.
-
register_cli_opts(opts, group=None)¶ Register multiple CLI options for the test run.
This works in the same manner as register_opt() but takes a list of options as the first argument. All arguments will be registered to the same group if the
groupargument is supplied, otherwise all options will be registered to thedefaultgroup.CLI options must be registered before the command line and config files are parsed. This is to ensure that all CLI options are shown in –help and option validation works as expected.
-
register_opt(opt, group=None)¶ Register a single option for the test run.
Options registered in this manner will automatically be unregistered during cleanup.
If a group argument is supplied, it will register the new option to that group, otherwise the option is registered to the
defaultgroup.
-
register_opts(opts, group=None)¶ Register multiple options for the test run.
This works in the same manner as register_opt() but takes a list of options as the first argument. All arguments will be registered to the same group if the
groupargument is supplied, otherwise all options will be registered to thedefaultgroup.
-