pungi/tests/test_gather_method_nodeps.py
Haibo Lin 3eddcfccd8 Fix flake8 complaints - F401
F401 'dnf' imported but unused
F401 'imp' imported but unused
F401 'os' imported but unused
F401 'subprocess' imported but unused
F401 'sys' imported but unused
F401 'yum' imported but unused

JIRA: COMPOSE-4108
Signed-off-by: Haibo Lin <hlin@redhat.com>
2020-02-07 11:48:31 +08:00

33 lines
861 B
Python

# -*- coding: utf-8 -*-
import mock
import os
import six
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"]
)
six.assertCountEqual(
self,
packages,
[
("dummy-bash", "x86_64"),
("dummy-elinks", "x86_64"),
("dummy-tftp", "x86_64"),
],
)