pungi/tests/test_gather_method_nodeps.py
soksanichenko f430e3fc9a - Mock of Koji is moved to the separate modules, classes
- Unittests for mock of Koji are moved to the separate
- AL9 version
- Use builtin mock instead python library
2022-11-07 20:10:33 +02:00

33 lines
875 B
Python

# -*- coding: utf-8 -*-
from unittest 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"),
],
)