2017-06-21 11:35:36 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import mock
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
2019-10-04 12:45:03 +00:00
|
|
|
import six
|
|
|
|
|
2017-06-21 11:35:36 +00:00
|
|
|
from pungi.phases.gather.methods import method_nodeps as nodeps
|
|
|
|
from tests import helpers
|
|
|
|
|
2020-01-22 10:02:22 +00:00
|
|
|
COMPS_FILE = os.path.join(helpers.FIXTURE_DIR, "comps.xml")
|
2017-06-21 11:35:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
class TestWritePungiConfig(helpers.PungiTestCase):
|
|
|
|
def setUp(self):
|
|
|
|
super(TestWritePungiConfig, self).setUp()
|
|
|
|
self.compose = helpers.DummyCompose(self.topdir, {})
|
|
|
|
self.compose.paths.work.comps = mock.Mock(return_value=COMPS_FILE)
|
|
|
|
|
|
|
|
def test_expand_group(self):
|
2020-01-22 10:02:22 +00:00
|
|
|
packages = nodeps.expand_groups(
|
|
|
|
self.compose, "x86_64", None, ["core", "text-internet"]
|
|
|
|
)
|
2019-10-04 12:45:03 +00:00
|
|
|
six.assertCountEqual(
|
|
|
|
self,
|
|
|
|
packages,
|
|
|
|
[
|
|
|
|
("dummy-bash", "x86_64"),
|
|
|
|
("dummy-elinks", "x86_64"),
|
|
|
|
("dummy-tftp", "x86_64"),
|
|
|
|
],
|
|
|
|
)
|