Skip to content

Commit 80fa583

Browse files
committed
Add test for bagging content with 'data' present
1 parent 087b6ca commit 80fa583

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ def test_make_bag(self):
5858
self.assertTrue('Payload-Oxum: 991765.5' in bag_info_txt)
5959
self.assertTrue('Bag-Software-Agent: bagit.py <http://github.com/edsu/bagit' in bag_info_txt)
6060

61+
def test_make_bag_with_data_dir_present(self):
62+
os.mkdir(j(self.tmpdir, 'data'))
63+
bag = bagit.make_bag(self.tmpdir)
64+
65+
# data dir should now contain another data dir
66+
self.assertTrue(os.path.isdir(j(self.tmpdir, 'data', 'data')))
67+
6168
def test_bag_class(self):
6269
info = {'Contact-Email': 'ehs@pobox.com'}
6370
bag = bagit.make_bag(self.tmpdir, bag_info=info)

0 commit comments

Comments
 (0)