def test_migrateTrackbacksForEntry_published(self):
        # Disabled because publishing the item broke the unittesting
        # mechanism somehow.

        # Modify the entry to have the old trackback attribute.
        existingURLs = ['http://sam.pl/e', 'http://example.org/reutel']
        existingURLs.sort()
        self.entry.trackbackURLs = existingURLs
        # Publish the entry.
        wftool = getToolByName(self.entry, 'portal_workflow')
        wftool.doActionFor(self.entry, 'publish')
        # Migrate and check the results.
        self.migration.migrateTrackbacksForEntry(self.entry)
        tbim = ITrackbackOutManager(self.entry)
        # Now we need to search for the pinged URLs.
        results = list(tbim.getPingedURLs())
        results.sort()
        self.assertEquals(existingURLs, results)
        # The trackbackURLS attribute should be gone.
        self.assertEquals(
            getattr(self.entry, 'trackbackURLs', 'way of the dodo'),
            'way of the dodo')
        # Migrate again, results should be the same.
        self.migration.migrateTrackbacksForEntry(self.entry)
        tbim = ITrackbackOutManager(self.entry)
        results = list(tbim.getPingedURLs())
        results.sort()
        self.assertEquals(existingURLs, results)
    def test_migrateTrackbacksForEntry_published(self):
        # Disabled because publishing the item broke the unittesting
        # mechanism somehow.

        # Modify the entry to have the old trackback attribute.
        existingURLs = ['http://sam.pl/e', 
                        'http://example.org/reutel']
        existingURLs.sort()
        self.entry.trackbackURLs = existingURLs
        # Publish the entry.
        wftool = getToolByName(self.entry, 'portal_workflow')
        wftool.doActionFor(self.entry, 'publish')
        # Migrate and check the results.
        self.migration.migrateTrackbacksForEntry(self.entry)
        tbim = ITrackbackOutManager(self.entry)
        # Now we need to search for the pinged URLs.
        results = list(tbim.getPingedURLs())
        results.sort()
        self.assertEquals(existingURLs, results)
        # The trackbackURLS attribute should be gone.
        self.assertEquals(getattr(self.entry, 'trackbackURLs',
                                   'way of the dodo'),
                          'way of the dodo')
        # Migrate again, results should be the same.
        self.migration.migrateTrackbacksForEntry(self.entry)
        tbim = ITrackbackOutManager(self.entry)
        results = list(tbim.getPingedURLs())
        results.sort()
        self.assertEquals(existingURLs, results)