-testsuccess aptget update -o APT::Acquire::By-Hash=1
-
-# ensure it keeps working
-testequal "Inst foo (1.0 unstable [all])
-Conf foo (1.0 unstable [all])" aptget install -qq -s foo
\ No newline at end of file
+testsuccess aptget update -o APT::Acquire::By-Hash=1 -o Acquire::Languages=none
+
+ensureitworks() {
+ testsuccessequal "Inst foo (1.0 unstable [all])
+Conf foo (1.0 unstable [all])" aptget install -qq -s foo
+}
+ensureitworks
+
+# add magic string to Release file ...
+MAGIC="Acquire-By-Hash: true"
+sed -i "s#Suite: unstable#Suite: unstable\n$MAGIC#" aptarchive/dists/unstable/Release
+signreleasefiles
+# ... and verify that it fetches by hash now
+rm -rf rootdir/var/lib/apt/lists
+testsuccess aptget update -o Acquire::Languages=none
+
+ensureitworks