def testDeleteDataForAllParts(self):
     s = MultiSequentialStorage(self.tempdir)
     s.addData('2', "part1", "data1")
     s.addData('2', "part2", "data2")
     s.deleteData('2')
     self.assertRaises(KeyError, lambda: s.getData('2', 'part1'))
     self.assertRaises(KeyError, lambda: s.getData('2', 'part2'))
 def testAddToExistingEmptyStore(self):
     s = MultiSequentialStorage(self.tempdir)
     s.addData('1', "oai_dc", "<data/>")
     s.deleteData('1', 'oai_dc')
     s.commit()
     s.addData('1', "oai_dc", "<data/>")