def CollectRequirements(self) -> List[Structure]: """Collect requirements of the modules. :return: a list of DBus structures of the type Requirement """ return Requirement.to_structure_list( self.implementation.collect_requirements())
def CollectRequirements(self) -> List[Structure]: """Return installation requirements of this module. :return: a list of requirements """ return Requirement.to_structure_list( self.implementation.collect_requirements())
def collect_remote_requirements_test(self, proxy_getter): """Test the function collect_remote_requirements.""" r1 = self._create_requirement("a", "Required by A.") r2 = self._create_requirement("b", "Required by B.") r3 = self._create_requirement("c", "Required by C.") boss = BOSS.get_proxy() boss.CollectRequirements.return_value = \ Requirement.to_structure_list([r1, r2, r3]) requirements = collect_remote_requirements() self._compare_requirements(requirements, [r1, r2, r3])
def _add_module_with_requirement(self, service_name, package_name, available=True): """Add a DBus module with a package requirement.""" requirement = Requirement.for_package( package_name=package_name, reason="Required by {}.".format(service_name) ) module_proxy = Mock() module_proxy.CollectRequirements.return_value = \ Requirement.to_structure_list([requirement]) self._add_module(service_name, available=available, proxy=module_proxy)