def test_no_all_structure(self): # Ensure the all argument isn't present self.command = cudl.ListRepositoriesCommand(self.context, include_all_flag=False) expected_option_names = set(['--details', '--fields']) found_option_names = set([o.name for o in self.command.options]) self.assertEqual(expected_option_names, found_option_names)
def __init__(self, context): """ @param context: @type context: pulp.client.extensions.core.ClientContext """ PulpCliSection.__init__(self, 'repo', _('list repositories and manage repo groups')) self.context = context self.prompt = context.prompt # for easier access self.add_command(repo_commands.ListRepositoriesCommand(context, include_all_flag=False)) self.add_command(DownloadRepositoryCommand(context, PublishStepStatusRenderer(context))) # Subsections self.add_subsection(RepoGroupSection(context)) self.add_subsection(RepoHistorySection(context))
def setUp(self): super(ListRepositoriesCommandTests, self).setUp() self.command = cudl.ListRepositoriesCommand(self.context)