Exemplo n.º 1
0
 def test_archive_parser_no_repos(self):
     """test_archive_parser_no_repos"""
     parser = ArchiveParser(INSIGHTS_ARCHIVE_NO_REPOS_FILE)
     parser.parse()
     assert parser.package_list
     assert 'alsa-firmware-0:1.0.28-2.el7.noarch' in parser.package_list
     assert not parser.repo_list
Exemplo n.º 2
0
 def test_archive_parser(self):
     """test_archive_parser"""
     parser = ArchiveParser(INSIGHTS_ARCHIVE_FILE)
     parser.parse()
     assert parser.package_list
     assert 'alsa-firmware-0:1.0.28-2.el7.noarch' in parser.package_list
     assert parser.repo_list
     assert 'rhel-7-server-optional-rpms' in parser.repo_list
     assert not parser.modules_list
Exemplo n.º 3
0
 def test_archive_parser_modules(self):
     """test_archive_parser_modules"""
     parser = ArchiveParser(INSIGHTS_ARCHIVE_MODULES_FILE)
     parser.parse()
     assert parser.package_list
     assert 'alsa-firmware-0:1.0.28-2.el7.noarch' in parser.package_list
     assert parser.repo_list
     assert 'rhel-7-server-optional-rpms' in parser.repo_list
     assert parser.modules_list[0]['module_name'] == 'gimp'
Exemplo n.º 4
0
    def test_package_blacklist(self):
        """test deleting blacklisted pkgs"""
        parser = ArchiveParser(INSIGHTS_ARCHIVE_FILE)
        pkglist = {"kernel": []}
        for pkg_name in PACKAGE_BLACKLIST:
            pkglist[pkg_name] = []

        parser._delete_blacklisted_packages(pkglist)  # pylint: disable=protected-access

        assert "kernel" in pkglist
        for pkg_name in PACKAGE_BLACKLIST:
            assert pkg_name not in pkglist
Exemplo n.º 5
0
 def test_archive_parser_no_packages(self):
     """test_archive_parser_no_packages"""
     parser = ArchiveParser(INSIGHTS_ARCHIVE_NO_PACKAGES_FILE)
     parser.parse()
     assert not parser.package_list