Пример #1
0
 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])
Пример #2
0
 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)
Пример #3
0
 def test_reset(self):
     base = support.MockBase('main')
     base.reset(sack=True, repos=False)
     self.assertIsNone(base._sack)
     self.assertLength(base.repos, 1)
Пример #4
0
 def setUp(self):
     self.base = support.MockBase('broken_deps')
     self.base.conf.best = True
Пример #5
0
 def setUp(self):
     self.base = support.MockBase("main")
     self.base._transaction = dnf.transaction.Transaction()
Пример #6
0
 def setUp(self):
     self.base = support.MockBase('main')
     self.base.read_mock_comps(False)
     self.base.init_sack()
Пример #7
0
 def setUp(self):
     self.base = support.MockBase('main', 'third_party', 'broken_deps')
     self.base.conf.multilib_policy = "all"
     assert self.base.conf.best == False
Пример #8
0
 def setUp(self):
     self.base = support.MockBase('main', 'old_versions')
Пример #9
0
 def setUp(self):
     base = support.MockBase("main")
     self.cmd = search.SearchCommand(base.mock_cli())
Пример #10
0
 def setUp(self):
     base = support.MockBase("main")
     base.read_mock_comps()
     base.init_sack()
     self.cmd = group.GroupCommand(base.mock_cli())
Пример #11
0
 def setUp(self):
     self.base = support.MockBase("distro")
     self.sack = self.base.sack
Пример #12
0
 def test_instance(self):
     base = support.MockBase()
     self.assertIsNotNone(base)
Пример #13
0
 def test_translate_comps_pkg_types(self):
     base = support.MockBase()
     num = base._translate_comps_pkg_types(('mandatory', 'optional'))
     self.assertEqual(num, 12)
Пример #14
0
 def setUp(self):
     self.base = support.MockBase('updates')
     self.output = dnf.cli.output.Output(self.base, self.base.conf)
Пример #15
0
    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
Пример #16
0
 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())
Пример #17
0
 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()
Пример #18
0
 def setUp(self):
     self.base = support.MockBase()
     self.allow_erasing = True
Пример #19
0
 def setUp(self):
     self.base = support.MockBase("main")
     self.base.read_mock_comps()
     self.base.init_sack()
Пример #20
0
 def setUp(self):
     base = support.MockBase("main")
     self.sack = base.sack
     self.pkg = self.sack.query().available().filter(name="pepper")[1]
Пример #21
0
 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
Пример #22
0
 def setUp(self):
     self.base = support.MockBase('main')
     self.base.conf.multilib_policy = 'all'
     self.sack = self.base.sack
Пример #23
0
 def setUp(self):
     self.base = support.MockBase('main', 'third_party', 'broken_deps')
Пример #24
0
 def test_rpmdb_version(self):
     base = support.MockBase()
     sack = base.sack
     version = sack._rpmdb_version(base.history)
     self.assertIsNotNone(version)
Пример #25
0
 def setUp(self):
     self.base = support.MockBase("main")
     self.sack = self.base.sack
Пример #26
0
 def setUp(self):
     self.base = support.MockBase("broken_deps")
     self.sack = self.base.sack
Пример #27
0
 def test_read_comps_disabled(self):
     base = support.MockBase("main")
     base.repos['main'].enablegroups = False
     self.assertEmpty(base.read_comps())
Пример #28
0
 def setUp(self):
     self.base = support.MockBase("main")
     self.base.output = support.MockOutput()
     self.cli = dnf.cli.cli.Cli(self.base)
Пример #29
0
 def setUp(self):
     self.base = support.MockBase()
     self.cli = self.base.mock_cli()
Пример #30
0
 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())