aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linaro_image_tools/hwpack/testing.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/linaro_image_tools/hwpack/testing.py b/linaro_image_tools/hwpack/testing.py
index 9d6a17d..cc9bc93 100644
--- a/linaro_image_tools/hwpack/testing.py
+++ b/linaro_image_tools/hwpack/testing.py
@@ -126,6 +126,12 @@ class DummyFetchedPackage(FetchedPackage):
md5sum.update(self.content.read())
return md5sum.hexdigest()
+ @property
+ def sha256(self):
+ sha256sum = hashlib.sha256()
+ sha256sum.update(self.content.read())
+ return sha256sum.hexdigest()
+
class AptSourceFixture(object):
"""A fixture that provides an apt source, with packages and indices.