'Check that deleting the object works.'

def testDelete(self):

    path = '/C.0123456789abcdef/foo/bar/hello.txt'
    fd = aff4.FACTORY.Create(path, aff4.AFF4MemoryStream, token=self.token)
    fd.Write('hello')
    fd.Close()
    aff4.FACTORY.Delete(os.path.dirname(path), token=self.token)
    self.assertRaises(IOError, aff4.FACTORY.Open, path, aff4.AFF4MemoryStream, token=self.token)
