aboutsummaryrefslogtreecommitdiff
path: root/tests/component/deb/test_import_dsc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/component/deb/test_import_dsc.py')
-rw-r--r--tests/component/deb/test_import_dsc.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py
index 615ef97..549b5e3 100644
--- a/tests/component/deb/test_import_dsc.py
+++ b/tests/component/deb/test_import_dsc.py
@@ -33,14 +33,6 @@ from gbp.deb.dscfile import DscFile
class TestImportDsc(ComponentTestBase):
"""Test importing of debian source packages"""
- @staticmethod
- def _hash_file(filename):
- h = hashlib.md5()
- with open(filename, 'rb') as f:
- buf = f.read()
- h.update(buf)
- return h.hexdigest()
-
def test_debian_import(self):
"""Test that importing of debian native packages works"""
def _dsc(version):
@@ -128,9 +120,9 @@ class TestImportDsc(ComponentTestBase):
outdir = os.path.abspath('.')
for f, w, s, o in ptars:
eq_(repo.get_subject(w), 'pristine-tar data for %s' % f)
- old = self._hash_file(o)
+ old = self.hash_file(o)
p.checkout('hello-debhelper', '2.8', 'gzip', outdir, subtarball=s)
- new = self._hash_file(os.path.join(outdir, f))
+ new = self.hash_file(os.path.join(outdir, f))
eq_(old, new, "Checksum %s of regenerated tarball %s does not match original %s" %
(f, old, new))