Example #1
0
    def test_init(self):
        pulp_cli.initialize(self.context)

        root = self.context.cli.find_subsection(structure.SECTION_ROOT)
        self.assertTrue(bind.BindCommand(self.context).name in root.commands)
        self.assertTrue(bind.UnbindCommand(self.context).name in root.commands)
        self.assertTrue(pulp_cli.SEARCH_NAME in root.commands)
Example #2
0
def initialize(context):
    """
    :type context: pulp.client.extensions.core.ClientContext
    """

    structure.ensure_puppet_root(context.cli)

    root_section = structure.root_section(context.cli)
    root_section.add_command(bind.BindCommand(context))
    root_section.add_command(bind.UnbindCommand(context))
    root_section.add_command(
        RepoSearchCommand(context,
                          constants.REPO_NOTE_PUPPET,
                          name=SEARCH_NAME))
Example #3
0
 def setUp(self):
     self.command = bind.UnbindCommand(mock.MagicMock())