def mock_comps(seed_persistor): comps = dnf.comps.Comps() comps.add_from_xml_filename(COMPS_PATH) persistor = MockGroupPersistor() if seed_persistor: p_env = persistor.environment('sugar-desktop-environment') p_env.grp_types = dnf.comps.ALL_TYPES p_env.pkg_types = dnf.comps.ALL_TYPES p_env.full_list.extend(('Peppers', 'somerset')) p_pep = persistor.group('Peppers') p_pep.pkg_types = dnf.comps.MANDATORY p_pep.full_list.extend(('hole', 'lotus')) p_som = persistor.group('somerset') p_som.pkg_types = dnf.comps.MANDATORY p_som.full_list.extend(('pepper', 'trampoline', 'lotus')) return comps, persistor
def mock_comps(seed_persistor): comps = dnf.comps.Comps() comps._add_from_xml_filename(COMPS_PATH) persistor = MockGroupPersistor() if seed_persistor: p_env = persistor.environment('sugar-desktop-environment') p_env.grp_types = dnf.comps.ALL_TYPES p_env.pkg_types = dnf.comps.ALL_TYPES p_env.full_list.extend(('Peppers', 'somerset')) p_pep = persistor.group('Peppers') p_pep.pkg_types = dnf.comps.MANDATORY p_pep.full_list.extend(('hole', 'lotus')) p_som = persistor.group('somerset') p_som.pkg_types = dnf.comps.MANDATORY p_som.full_list.extend(('pepper', 'trampoline', 'lotus')) return comps, persistor
def mock_comps(seed_persistor): comps = dnf.comps.Comps() comps.add_from_xml_filename(COMPS_PATH) persistor = MockGroupPersistor() if seed_persistor: p_env = persistor.environment("sugar-desktop-environment") p_env.grp_types = dnf.comps.ALL_TYPES p_env.pkg_types = dnf.comps.ALL_TYPES p_env.full_list.extend(("Peppers", "somerset")) p_pep = persistor.group("Peppers") p_pep.pkg_types = dnf.comps.MANDATORY p_pep.full_list.extend(("hole", "lotus")) p_som = persistor.group("somerset") p_som.pkg_types = dnf.comps.MANDATORY p_som.full_list.extend(("pepper", "trampoline", "lotus")) return comps, persistor