def setUpModule(): # pylint:disable=invalid-name """Conditionally skip the tests in this module. Skip the tests in this module if: * The RPM plugin is not installed on the target Pulp server. * `Pulp #1759`_ is not implemented on the target Pulp server. * `Pulp #3313`_ is not fixed on the target Pulp server, and the target host is running Fedora 27. .. _Pulp #1759: https://pulp.plan.io/issues/1759 .. _Pulp #3313: https://pulp.plan.io/issues/3313 """ set_up_module() cfg = config.get_config() if not selectors.bug_is_fixed(1759, cfg.pulp_version): raise unittest.SkipTest('https://pulp.plan.io/issues/1759') if not selectors.bug_is_fixed(3313, cfg.pulp_version) and os_is_f27(cfg): raise unittest.SkipTest('https://pulp.plan.io/issues/3313') if cfg.pulp_selinux_enabled: set_pulp_manage_rsync(cfg, True)
def tearDown(self): """Reset the ``pulp_manage_rsync`` boolean.""" if self.cfg.pulp_selinux_enabled: set_pulp_manage_rsync(self.cfg, False)
def setUp(self): """Set the ``pulp_manage_rsync`` boolean.""" self.cfg = config.get_config() if self.cfg.pulp_selinux_enabled: set_pulp_manage_rsync(self.cfg, True)
def tearDownModule(): # pylint:disable=invalid-name """Delete orphan content units.""" cfg = config.get_config() api.Client(cfg).delete(ORPHANS_PATH) if cfg.pulp_selinux_enabled: set_pulp_manage_rsync(cfg, False)