Exemple #1
0
 def test_get_formatter_for_type(self, get_formatter):
     context = mock.Mock(
         config={'output': {
             'poll_frequency_in_seconds': 10
         }})
     command = content.ManifestRemoveCommand(context)
     formatter = command.get_formatter_for_type(constants.MANIFEST_TYPE_ID)
     self.assertEqual(formatter, get_formatter.return_value)
Exemple #2
0
 def test_init(self):
     context = mock.Mock(
         config={'output': {
             'poll_frequency_in_seconds': 10
         }})
     command = content.ManifestRemoveCommand(context)
     self.assertEqual(command.name, 'manifest')
     self.assertFalse(command.description is None)
     self.assertEqual(command.context, context)
     self.assertEqual(command.method, command.run)
Exemple #3
0
def add_remove_section(context, parent_section):
    """
    Add the remove section to the parent section.

    :param context: pulp context
    :type  context: pulp.client.extensions.core.ClientContext
    :param parent_section: section of the CLI to which the this section
        should be added
    :type  parent_section: pulp.client.extensions.extensions.PulpCliSection
    """
    section = parent_section.create_subsection(SECTION_REMOVE, DESC_REMOVE)
    section.add_command(ImageRemoveCommand(context))
    section.add_command(content.ManifestRemoveCommand(context))
    section.add_command(content.TagRemoveCommand(context))
    return section