Changeset 3212 in products for quintagroup.pfg.captcha


Ignore:
Timestamp:
May 4, 2011 11:24:37 AM (13 years ago)
Author:
vmaksymiv
Message:

fixed tests plone3.0 compatibility

Location:
quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/tests/base.py

    r3168 r3212  
    5252        # Install PROJECT 
    5353        qi = getattr(portal, 'portal_quickinstaller', None) 
    54         qi.installProduct("quintagroup.pfg.captcha") 
     54        for p in REQUIREMENTS: 
     55            if not qi.isProductInstalled(p): 
     56                qi.installProduct(p) 
    5557        transaction.commit() 
    5658 
  • quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/tests/testMigration.py

    r3168 r3212  
    11import unittest 
    2 from quintagroup.pfg.captcha.tests.base import TestCaseNotInstalled 
     2from quintagroup.pfg.captcha.tests.base import TestCaseNotInstalled, \ 
     3    REQUIREMENTS 
    34 
    45 
     
    3536    def prepareToMigration(self): 
    3637        # Install types 
    37         self.addProduct("quintagroup.pfg.captcha") 
     38        for p in REQUIREMENTS: 
     39            if not self.qi.isProductInstalled(p): 
     40                self.qi.installProduct(p) 
    3841        # Add captcha field 
    3942        self.portal.invokeFactory("FormFolder", 'test_form') 
Note: See TracChangeset for help on using the changeset viewer.