Ejemplo n.º 1
0
def get_install_backend():
    global install_backend
    if install_backend is None:
        from softwarecenter.enums import USE_PACKAGEKIT_BACKEND
        if not USE_PACKAGEKIT_BACKEND:
            from softwarecenter.backend.installbackend_impl.aptd import (
                AptdaemonBackend)
            install_backend = AptdaemonBackend()
        else:
            from softwarecenter.backend.installbackend_impl.packagekitd \
                import PackagekitBackend
            install_backend = PackagekitBackend()
    return install_backend
Ejemplo n.º 2
0
 def setUp(self):
     self.aptd = AptdaemonBackend()
     # monkey patch
     self.aptd.aptd_client.install_packages = self._mock_aptd_client_install_packages
     self._pkgs_to_install = []