diff --git a/tests/lib.py b/tests/lib.py index 44155712..2acb24e8 100644 --- a/tests/lib.py +++ b/tests/lib.py @@ -42,3 +42,9 @@ def get_file_magic(filename): finally: ms.close() return details + +def this_is_rhel(): + """Check to see if the tests are running on RHEL + """ + release = open("/etc/system-release", "r").read() + return "Red Hat Enterprise Linux" in release diff --git a/tests/pylorax/test_projects.py b/tests/pylorax/test_projects.py index 1e9f2323..a954e141 100644 --- a/tests/pylorax/test_projects.py +++ b/tests/pylorax/test_projects.py @@ -22,6 +22,7 @@ import tempfile import time import unittest +from ..lib import this_is_rhel from pylorax.sysutils import joinpaths from pylorax.api.config import configure, make_dnf_dirs from pylorax.api.projects import api_time, api_changelog, pkg_to_project, pkg_to_project_info, pkg_to_dep @@ -196,7 +197,11 @@ class ProjectsTest(unittest.TestCase): self.assertEqual(modules[0]["dependencies"][0]["name"], "basesystem") def test_groups_depsolve(self): - deps = projects_depsolve(self.dbo, [], ["c-development"]) + if this_is_rhel(): + group_names = ["development"] + else: + group_names = ["c-development"] + deps = projects_depsolve(self.dbo, [], group_names) names = [grp["name"] for grp in deps] self.assertTrue("autoconf" in names) # mandatory package self.assertTrue("ctags" in names) # default package