def add_upload_section(context, parent_section): """ add an upload section to the docker section :type context: pulp.client.extensions.core.ClientContext :param parent_section: section of the CLI to which the upload section should be added :type parent_section: pulp.client.extensions.extensions.PulpCliSection """ upload_section = parent_section.create_subsection(SECTION_UPLOADS, DESC_UPLOADS) upload_section.add_command(UploadDockerImageCommand(context)) return upload_section
def setUp(self): self.context = mock.MagicMock() self.context.config = test_config self.command = UploadDockerImageCommand(self.context)