Ignore:
Timestamp:
Mar 17, 2010 6:40:45 PM (14 years ago)
Author:
liebster
Message:

Add seo_canonical property migration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/branches/refactoring2.3.0/quintagroup/seoptimizer/tests/testInstallation.py

    r1926 r1930  
    88from zope.viewlet.interfaces import IViewletManager 
    99 
     10from quintagroup.canonicalpath.adapters import PROPERTY_LINK 
    1011from quintagroup.seoptimizer.browser.interfaces import IPloneSEOLayer 
    11  
    1212from base import * 
    1313 
     
    220220                '%s layer found in %s after uninstallation' %(layer, skin)) 
    221221 
     222    def testMigrateCanonical(self): 
     223        """ Test Migrate qSEO_canonical property into PROPERTY_LINK 
     224            for all portal objects, which use SEO 
     225        """ 
     226        doc = self.portal.get('front-page') 
     227        doc.manage_addProperty('qSEO_canonical', 'val', 'string') 
     228        value = doc.getProperty('qSEO_canonical') 
     229        assert doc.getProperty('qSEO_canonical') == 'val'  
     230 
     231        self.qi.reinstallProducts([PROJECT_NAME]) 
     232        value = doc.getProperty(PROPERTY_LINK) 
     233        has_prop = bool(doc.hasProperty('qSEO_canonical')) 
     234        self.assertEqual(has_prop, False, "Property 'qSEO_canonical' is not deleted.") 
     235        self.assertEqual(value == 'val', True, 
     236                "Property not migrated from 'qSEO_canonical' to '%s'." % PROPERTY_LINK) 
    222237 
    223238def test_suite(): 
Note: See TracChangeset for help on using the changeset viewer.