def test_clear(self): original = GenericWrapper() wrapcache.add(original) copy1 = wrapcache.wrap(original.xmlnode) self.assertTrue(original is copy1) wrapcache.clear() copy2 = wrapcache.wrap(original.xmlnode) self.assertFalse(original is copy2)
def test_remove(self): original = GenericWrapper() wrapcache.add(original) wrapcache.remove(original) copy = wrapcache.wrap(original.xmlnode) self.assertTrue(original is not copy)
def test_add_and_wrap(self): original = GenericWrapper() wrapcache.add(original) copy = wrapcache.wrap(original.xmlnode) self.assertTrue(original is copy)