This tests checks that isLinked can now be used safely as it eventually plays well with transaction machinery. >>> self.setRoles(('Manager',)) Let's add an image. >>> import transaction >>> transaction.begin() >>> portal.invokeFactory('Image', 'new_image') 'new_image' >>> transaction.commit() Check that it has been persisted. >>> browser = self.getBrowser(loggedIn=True) >>> browser.open('http://nohost/plone/folder_contents') >>> browser.contents '...>> transaction.begin() >>> portal.invokeFactory('Image', 'another_image') 'another_image' Even though we use isLinked, >>> from Products.CMFPlone.utils import isLinked >>> isLinked(portal.another_image) False >>> transaction.commit() the second image is also persisted. >>> browser = self.getBrowser(loggedIn=True) >>> browser.open('http://nohost/plone/folder_contents') >>> browser.contents '...>> transaction.begin() >>> portal.invokeFactory('Image', 'another_new_image') 'another_new_image' Let's link it into a document. >>> self.setText(portal.doc1, portal.another_new_image.tag()) Even though we use isLinked, >>> isLinked(portal.another_new_image) True the third image is also persisted. >>> browser = self.getBrowser(loggedIn=True) >>> browser.open('http://nohost/plone/folder_contents') >>> browser.contents '...