Skip to content

Commit ae4cdc0

Browse files
committed
The test for the sha1 tagmanifest was pinned to a particular date. Fixes #38
1 parent 7fdd0fe commit ae4cdc0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,18 +270,19 @@ def test_validate_optional_tagfile(self):
270270
self.assertRaises(bagit.BagValidationError, self.validate, bag)
271271

272272
def test_sha1_tagfile(self):
273-
bag = bagit.make_bag(self.tmpdir, checksum=['sha1'])
273+
info = {'Bagging-Date': '1970-01-01', 'Contact-Email': '[email protected]'}
274+
bag = bagit.make_bag(self.tmpdir, checksum=['sha1'], bag_info=info)
274275
self.assertTrue(os.path.isfile(j(self.tmpdir, 'tagmanifest-sha1.txt')))
275-
self.assertEqual(bag.entries['bag-info.txt']['sha1'], 'b537642e07abc0c22c428aee65180e97f78e61dc')
276-
276+
self.assertEqual(bag.entries['bag-info.txt']['sha1'], 'd7f086508df433e5d7464b5a3835d5501df14404')
277+
277278
def test_validate_unreadable_file(self):
278279
bag = bagit.make_bag(self.tmpdir, checksum=["md5"])
279280
os.chmod(j(self.tmpdir, "data/loc/2478433644_2839c5e8b8_o_d.jpg"), 0)
280281
self.assertRaises(bagit.BagValidationError, self.validate, bag, fast=False)
281282

282283

283284
class TestMultiprocessValidation(TestSingleProcessValidation):
284-
285+
285286
def validate(self, bag, *args, **kwargs):
286287
return super(TestMultiprocessValidation, self).validate(bag, *args, processes=2, **kwargs)
287288

0 commit comments

Comments
 (0)