We no longer need to support Python 2, so there's no point in this compatibility layer. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com> (cherry picked from commit b34de57813187f1781aef733468c9745a144d9af)
30 lines
846 B
Python
30 lines
846 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from unittest import mock
|
|
import os
|
|
|
|
from pungi.phases.gather.methods import method_nodeps as nodeps
|
|
from tests import helpers
|
|
|
|
COMPS_FILE = os.path.join(helpers.FIXTURE_DIR, "comps.xml")
|
|
|
|
|
|
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):
|
|
packages = nodeps.expand_groups(
|
|
self.compose, "x86_64", None, ["core", "text-internet"]
|
|
)
|
|
self.assertCountEqual(
|
|
packages,
|
|
[
|
|
("dummy-bash", "x86_64"),
|
|
("dummy-elinks", "x86_64"),
|
|
("dummy-tftp", "x86_64"),
|
|
],
|
|
)
|