def setUp(self): self.base = support.MockBase('main', 'third_party') pkg = self.base.sack.query().filter(name='lotus', arch='x86_64')[0] self.base.sack.add_excludes([pkg])
def test_read_comps(self): base = support.MockBase("main") base.repos['main'].metadata = mock.Mock(comps_fn=support.COMPS_PATH) base.read_comps() groups = base.comps.groups self.assertLength(groups, support.TOTAL_GROUPS)
def test_reset(self): base = support.MockBase('main') base.reset(sack=True, repos=False) self.assertIsNone(base._sack) self.assertLength(base.repos, 1)
def setUp(self): self.base = support.MockBase('broken_deps') self.base.conf.best = True
def setUp(self): self.base = support.MockBase("main") self.base._transaction = dnf.transaction.Transaction()
def setUp(self): self.base = support.MockBase('main') self.base.read_mock_comps(False) self.base.init_sack()
def setUp(self): self.base = support.MockBase('main', 'third_party', 'broken_deps') self.base.conf.multilib_policy = "all" assert self.base.conf.best == False
def setUp(self): self.base = support.MockBase('main', 'old_versions')
def setUp(self): base = support.MockBase("main") self.cmd = search.SearchCommand(base.mock_cli())
def setUp(self): base = support.MockBase("main") base.read_mock_comps() base.init_sack() self.cmd = group.GroupCommand(base.mock_cli())
def setUp(self): self.base = support.MockBase("distro") self.sack = self.base.sack
def test_instance(self): base = support.MockBase() self.assertIsNotNone(base)
def test_translate_comps_pkg_types(self): base = support.MockBase() num = base._translate_comps_pkg_types(('mandatory', 'optional')) self.assertEqual(num, 12)
def setUp(self): self.base = support.MockBase('updates') self.output = dnf.cli.output.Output(self.base, self.base.conf)
def setUp(self): self.base = support.MockBase("search") self.cli = dnf.cli.cli.Cli(self.base) self.base.output = mock.MagicMock() self.base.output.fmtSection = lambda str: str
def setUp(self): self.base = support.MockBase("search") self.base.output = mock.MagicMock() self.base.output.fmtSection = lambda str: str self.cmd = search.SearchCommand(self.base.mock_cli())
def setUp(self): """Set up a test where sugar is considered not installed.""" self.base = support.MockBase("main") self.base.init_sack() self.base.read_mock_comps()
def setUp(self): self.base = support.MockBase() self.allow_erasing = True
def setUp(self): self.base = support.MockBase("main") self.base.read_mock_comps() self.base.init_sack()
def setUp(self): base = support.MockBase("main") self.sack = base.sack self.pkg = self.sack.query().available().filter(name="pepper")[1]
def setUp(self): self.base = support.MockBase('main', 'third_party', 'broken_deps') self.installed = self.base.sack.query().installed().run() self.assertEqual(self.base.conf.multilib_policy, "best") assert self.base.conf.best == False
def setUp(self): self.base = support.MockBase('main') self.base.conf.multilib_policy = 'all' self.sack = self.base.sack
def setUp(self): self.base = support.MockBase('main', 'third_party', 'broken_deps')
def test_rpmdb_version(self): base = support.MockBase() sack = base.sack version = sack._rpmdb_version(base.history) self.assertIsNotNone(version)
def setUp(self): self.base = support.MockBase("main") self.sack = self.base.sack
def setUp(self): self.base = support.MockBase("broken_deps") self.sack = self.base.sack
def test_read_comps_disabled(self): base = support.MockBase("main") base.repos['main'].enablegroups = False self.assertEmpty(base.read_comps())
def setUp(self): self.base = support.MockBase("main") self.base.output = support.MockOutput() self.cli = dnf.cli.cli.Cli(self.base)
def setUp(self): self.base = support.MockBase() self.cli = self.base.mock_cli()
def test_package_upgrade_fail(self): base = support.MockBase("main") p = base.sack.query().available().filter(name="mrkite")[0] self.assertEqual(0, base.package_upgrade(p)) base.resolve() self.assertEmpty(base._goal.list_upgrades())