def test_add_iso_section(self, _get_upload_manager): # We don't really need to test upload managers here, so let's just fake one for now _get_upload_manager.return_value = 'fake_upload_manager' structure.add_iso_section(self.context) # A root section should have been added for ISOs root_section = self.cli.find_section(structure.SECTION_ROOT) self.assertTrue(root_section is not None) self.assertEqual(root_section.name, structure.SECTION_ROOT) self.assertEqual(root_section.description, structure.DESC_ROOT) # There should now be a repo section added repo_section = root_section.subsections[structure.SECTION_REPO] self.assertTrue(repo_section is not None) self.assertEqual(repo_section.name, structure.SECTION_REPO)
def initialize(context): """ :param context: The client context that we can use to interact with the client framework :type context: pulp.client.extensions.core.ClientContext """ add_iso_section(context)