def setUp(self): self.options = [Option("--cls", cf=("config", "cls"), action=ImportComponentAction), Option("--module", action=ImportModuleAction)] self.result = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.result)
def setUp(self): OptionTestCase.setUp(self) self.options = [ Option("--parent", type=Types.comma_list, default=["one", "two"], action=ParentComponentAction)] self.result = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.result, description="component testing parser")
def setUp(self): self.options = [ Option("--cls", cf=("config", "cls"), action=ImportComponentAction), Option("--module", action=ImportModuleAction) ] self.result = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.result)
def setUp(self): self.options = [ PathOption(cf=("test", "config2"), action=ConfigFileAction), PathOption(cf=("test", "config3"), action=ConfigFileAction), Option(cf=("test", "foo")), Option(cf=("test", "bar")), Option(cf=("test", "baz"))] self.results = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.results)
def setUp(self): self.options = [ PathOption(cf=("test", "config2"), action=ConfigFileAction), PathOption(cf=("test", "config3"), action=ConfigFileAction), Option(cf=("test", "foo")), Option(cf=("test", "bar")), Option(cf=("test", "baz")) ] self.results = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.results)
def setUp(self): self.options = [ WildcardSectionGroup(Option(cf=("four:*", "foo")), Option(cf=("four:*", "bar"))), WildcardSectionGroup(Option(cf=("five:*", "foo")), Option(cf=("five:*", "bar")), prefix="", dest="sections") ] self.results = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.results)
def setUp(self): self.options = [ WildcardSectionGroup( Option(cf=("four:*", "foo")), Option(cf=("four:*", "bar"))), WildcardSectionGroup( Option(cf=("five:*", "foo")), Option(cf=("five:*", "bar")), prefix="", dest="sections")] self.results = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.results)
def setUp(self): OptionTestCase.setUp(self) self.options = [ Option("--parent", type=Types.comma_list, default=["one", "two"], action=ParentComponentAction) ] self.result = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.result, description="component testing parser")
def setUp(self): self.registry = CommandRegistry() self.one = local_subclass(One) self.two = local_subclass(Two) self.registry.register_command(self.one) self.registry.register_command(self.two) self.result = argparse.Namespace() Bcfg2.Options.Subcommands.master_setup = self.result new_parser() self.parser = get_parser(namespace=self.result, components=[self]) self.parser.add_options(self.registry.subcommand_options)
def setUp(self): self.component_parsed_hook = mock.Mock() self.options = [BooleanOption("--early-test", default=False)] self.results = argparse.Namespace() new_parser() self.parser = get_parser(components=[self], namespace=self.results)