def test_getObjectPath_no_path_to_root(self): self.assertEqual(getObjectPath(self.root['named_detached_item'], None), '/.../named_detached_item')
def test_getObjectPath_no_path_no_name(self): oid = u64(self.root['detached_item']._p_oid) self.assertEqual(getObjectPath(self.root['detached_item'], None), '0x%x' % oid)
def test_getObjectPath(self): self.assertEqual( getObjectPath(self.root['root']['item']['subitem'], None), '/item/subitem')