def test_saving_and_reopening(self): """ Test saving the index out and reopening it""" path = "abcd" dummy_content = "bnl2" self.ind.insert(path, dummy_content) self.ind.close() newind = cd.simpleIndex(self.rootpath) r = newind.getbypath(path) self.assertEqual(r, dummy_content) # now remove it for cleaning up newind.delete(path)
def setUp(self): self.rootpath = tempfile.mkdtemp() self.ind = cd.simpleIndex(self.rootpath)
def testInstantiate(self): """ Test instantiation of an empty index """ self.ind = cd.simpleIndex(self.rootpath)