Ignore:
Timestamp:
Jan 2, 2010 12:54:51 AM (14 years ago)
Author:
koval
Message:

updated package to work with a lastest version of quintagroup.transmogrifier

Location:
quintagroup.transmogrifier.pfm2pfg/trunk/quintagroup/transmogrifier/pfm2pfg/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.transmogrifier.pfm2pfg/trunk/quintagroup/transmogrifier/pfm2pfg/tests/test_export.py

    r350 r1496  
    77from Products.Marshall.registry import getComponent 
    88 
    9 from quintagroup.transmogrifier.pfm2pfg.exporting import PloneFormMailerExporter 
     9try: 
     10    import Products.PloneFormMailer 
     11    HAS_PFM = True 
     12except ImportError: 
     13    HAS_PFM = False 
    1014 
    11 ZopeTestCase.installProduct('Formulator') 
    12 ZopeTestCase.installProduct('MimetypesRegistry') 
    13 ZopeTestCase.installProduct('PortalTransforms') 
    14 ZopeTestCase.installProduct('Archetypes') 
    15 ZopeTestCase.installProduct('PloneFormMailer') 
    16 ZopeTestCase.installProduct('TALESField') 
     15# next condition is required, because a test preparation 
     16# raises errors on Plone 3+ 
     17if HAS_PFM: 
     18    from quintagroup.transmogrifier.pfm2pfg.exporting import PloneFormMailerExporter 
    1719 
    18 def setupPloneFormMailerTestCase(app, quiet=0): 
    19     get_transaction().begin() 
    20     _start = time.time() 
    21     if not quiet: 
    22         ZopeTestCase._print('Adding PloneFormMailer ... ') 
    23     app.portal.portal_quickinstaller.installProduct('PloneFormMailer') 
    24     get_transaction().commit() 
    25     if not quiet: 
    26         ZopeTestCase._print('done (%.3fs)\n' % (time.time()-_start,)) 
     20    ZopeTestCase.installProduct('Formulator') 
     21    ZopeTestCase.installProduct('MimetypesRegistry') 
     22    ZopeTestCase.installProduct('PortalTransforms') 
     23    ZopeTestCase.installProduct('Archetypes') 
     24    ZopeTestCase.installProduct('PloneFormMailer') 
     25    ZopeTestCase.installProduct('TALESField') 
    2726 
    28 app = ZopeTestCase.app() 
    29 setupPloneFormMailerTestCase(app, quiet=True) 
    30 ZopeTestCase.close(app) 
     27    def setupPloneFormMailerTestCase(app, quiet=0): 
     28        get_transaction().begin() 
     29        _start = time.time() 
     30        if not quiet: 
     31            ZopeTestCase._print('Adding PloneFormMailer ... ') 
     32        app.portal.portal_quickinstaller.installProduct('PloneFormMailer') 
     33        get_transaction().commit() 
     34        if not quiet: 
     35            ZopeTestCase._print('done (%.3fs)\n' % (time.time()-_start,)) 
     36 
     37    app = ZopeTestCase.app() 
     38    setupPloneFormMailerTestCase(app, quiet=True) 
     39    ZopeTestCase.close(app) 
    3140 
    3241class TestExport(PloneTestCase): 
  • quintagroup.transmogrifier.pfm2pfg/trunk/quintagroup/transmogrifier/pfm2pfg/tests/test_import.zcml

    r323 r1496  
    11<configure 
    22    xmlns="http://namespaces.zope.org/zope" 
    3     xmlns:transmogrifier="http://namespaces.plone.org/transmogrifier"> 
     3    xmlns:transmogrifier="http://namespaces.plone.org/transmogrifier" 
     4    i18n_domain="quintagroup.transmogrifier.pfm2pfg"> 
    45 
    56    <utility 
Note: See TracChangeset for help on using the changeset viewer.