From d4effc161071f6b2532332672e0d89bbd481be0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 28 Apr 2016 09:05:03 +0200 Subject: [PATCH] [pkgset] Fix caching RPMs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test mock did not actually match what is provided by Kobo. Signed-off-by: Lubomír Sedlář --- pungi/phases/pkgset/pkgsets.py | 2 +- tests/test_pkgset_pkgsets.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pungi/phases/pkgset/pkgsets.py b/pungi/phases/pkgset/pkgsets.py index 5ebcd90a..700b7b28 100644 --- a/pungi/phases/pkgset/pkgsets.py +++ b/pungi/phases/pkgset/pkgsets.py @@ -165,7 +165,7 @@ class PackageSetBase(kobo.log.LoggingBase): sourcerpm_name = kobo.rpmlib.parse_nvra(i.sourcerpm)["name"] seen_sourcerpms.add(sourcerpm_name) - self.file_cache[i.file_path] = i + self.file_cache.file_cache[i.file_path] = i self.rpms_by_arch[arch].append(i) self.log_debug("[DONE ] %s" % msg) diff --git a/tests/test_pkgset_pkgsets.py b/tests/test_pkgset_pkgsets.py index 3a1d6288..6d6f88f6 100755 --- a/tests/test_pkgset_pkgsets.py +++ b/tests/test_pkgset_pkgsets.py @@ -70,6 +70,7 @@ class MockFileCache(dict): """ def __init__(self, _wrapper): super(MockFileCache, self).__init__() + self.file_cache = self def add(self, file_path): obj = MockFile(file_path)