Changeset 2731 in products for quintagroup.pfg.captcha/branches


Ignore:
Timestamp:
Aug 10, 2010 9:59:59 AM (14 years ago)
Author:
mylan
Message:

#222: Move installation quintagroup.pfg.captcha with dependecies from global setupPloneSite to TestCase? classes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.pfg.captcha/branches/migration/quintagroup/pfg/captcha/tests.py

    r2101 r2731  
    3838 
    3939setup_product() 
    40 ptc.setupPloneSite(products=['PloneFormGen',], extension_profiles=PROFILES) 
     40ptc.setupPloneSite() #products=['PloneFormGen',], extension_profiles=PROFILES) 
    4141 
    4242 
    43 class TestInstallations(ptc.PloneTestCase): 
     43class PFGCaptchaTestCaseMixin(object): 
     44 
     45    def installPFGCaptcha(self): 
     46        for p in REQUIREMENTS: 
     47            self.addProduct(p) 
     48 
     49 
     50class PFGCaptchaAutoInstallTestCase(PFGCaptchaTestCaseMixin, ptc.PloneTestCase): 
     51    def afterSetUp(self): 
     52        self.installPFGCaptcha() 
     53 
     54 
     55class TestInstallations(PFGCaptchaAutoInstallTestCase): 
    4456 
    4557    def testInstalledProducts(self): 
     
    8092 
    8193 
    82 class TestCaptchaField(ptc.PloneTestCase): 
     94class TestCaptchaField(PFGCaptchaAutoInstallTestCase): 
    8395 
    8496    def afterSetUp(self): 
     97        super(TestCaptchaField, self).afterSetUp() 
    8598        self.folder.invokeFactory('FormFolder', 'ff1') 
    8699        self.ff1 = getattr(self.folder, 'ff1') 
     
    113126 
    114127 
    115 class TestCaptchaWidget(ptc.PloneTestCase): 
     128class TestCaptchaWidget(PFGCaptchaAutoInstallTestCase): 
    116129 
    117130    CF = CaptchaField.__module__ + '.CaptchaField' 
     
    119132 
    120133    def afterSetUp(self): 
     134        super(TestCaptchaWidget, self).afterSetUp() 
    121135        self.widgets = dict(availableWidgets()) 
    122136 
     
    135149 
    136150 
    137 class TestCaptchaValidator(ptc.PloneTestCase): 
     151class TestCaptchaValidator(PFGCaptchaAutoInstallTestCase): 
    138152 
    139153    def getValidator(self): 
Note: See TracChangeset for help on using the changeset viewer.