Changeset 3011 in products for quintagroup.seoptimizer/trunk


Ignore:
Timestamp:
Nov 12, 2010 3:40:41 PM (14 years ago)
Author:
mylan
Message:

#235: updated list of doctest files, remade FunctionalTestCases?

Location:
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/base.py

    r2936 r3011  
    9090        getUtility(IRAMCache).invalidateAll() 
    9191 
     92    def installBrowserLayer(self): 
     93        if not ptc.PLONE31: 
     94            qi = getattr(self.portal, 'portal_quickinstaller', None) 
     95            qi.installProduct("plone.browserlayer") 
     96 
    9297 
    9398class TestCase(MixinTestCase, ptc.PloneTestCase): 
     
    101106    layer = Installed 
    102107 
     108    def afterSetUp(self): 
     109        self.installBrowserLayer() 
     110 
    103111class FunctionalTestCaseNotInstalled(MixinTestCase, ptc.FunctionalTestCase): 
    104112    layer = NotInstalled 
    105113 
    106114    def afterSetUp(self): 
    107         qi = getattr(self.portal, 'portal_quickinstaller', None) 
    108         if not ptc.PLONE31: 
    109             qi.installProduct("plone.browserlayer") 
     115        self.installBrowserLayer() 
  • quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/tests/test_doctest.py

    r2139 r3011  
    99        # Demonstrate the main content types 
    1010        ztc.FunctionalDocFileSuite( 
    11             'browser.txt', package='quintagroup.seoptimizer.tests', 
     11            'seo_migration.txt', package='quintagroup.seoptimizer.tests', 
    1212            test_class=FunctionalTestCaseNotInstalled, globs=globals(), 
     13            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | 
     14                doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS), 
     15 
     16        ztc.FunctionalDocFileSuite( 
     17            'seo_properties.txt', package='quintagroup.seoptimizer.tests', 
     18            test_class=FunctionalTestCase, globs=globals(), 
    1319            optionflags=doctest.REPORT_ONLY_FIRST_FAILURE | 
    1420                doctest.NORMALIZE_WHITESPACE | doctest.ELLIPSIS), 
Note: See TracChangeset for help on using the changeset viewer.