diff options
author | Guido Günther <agx@sigxcpu.org> | 2016-07-03 19:20:02 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2016-07-04 14:09:58 +0200 |
commit | 0129d1527d35f68ae0360ba7814875dd1274acbb (patch) | |
tree | 1d790ebd6770c9d6643dd663aeb03c402e50d705 /tests/component/deb/test_import_dsc.py | |
parent | e5a3d5bb47a2ddd44c77f1e919527ff3c7932fef (diff) |
test_import_dsc: move _hash_file ComponenTestBase
Git-Dch: Ignore
Diffstat (limited to 'tests/component/deb/test_import_dsc.py')
-rw-r--r-- | tests/component/deb/test_import_dsc.py | 12 |
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)) |