Adjust test_drtfr_gpgkey to pass on Fedora 28 and RHEL 8

Depending on which version of dnf is installed it may return a tuple, or
may return a list. Work around this by only comparing the 1st element of
it.

Related: rhbz#1655876
This commit is contained in:
Brian C. Lane 2018-12-04 13:56:49 -08:00
parent 660e250804
commit 36fb75abd2

View File

@ -395,7 +395,7 @@ class SourceTest(unittest.TestCase):
def test_source_to_repo_gpgkey(self):
"""Test creating a dnf.Repo with a proxy"""
repo = source_to_repo(fakerepo_gpgkey(), self.dbo.conf)
self.assertEqual(repo.gpgkey, fakerepo_gpgkey()["gpgkey_urls"])
self.assertEqual(repo.gpgkey[0], fakerepo_gpgkey()["gpgkey_urls"][0])
def test_drtfr_baseurl(self):
"""Test creating a dnf .repo file from a baseurl Repo object"""