source: products/quintagroup.quills.extras/trunk/quintagroup/quills/extras/tests/base.py @ 1239

Last change on this file since 1239 was 1239, checked in by mylan, 15 years ago

Moved conditional adding IPossibleWeblogEntry to Document objects on adding it in the weblog, based on content rules and workflow transition. Tests updated

File size: 1.6 KB
Line 
1# -*- coding: utf-8 -*-
2from Products.Five import zcml
3from Products.Five import fiveconfigure
4from Testing import ZopeTestCase as ztc
5from Products.PloneTestCase import PloneTestCase as ptc
6from Products.PloneTestCase.layer import onsetup
7
8ZOPE_DEPS = []
9
10try:
11    import quintagroup.plonecomments
12except ImportError:
13    QPC_PACKAGE = False
14    from Products import qPloneComments
15else:
16    QPC_PACKAGE = True
17
18PLONE_INSTALL = ['QuillsEnabled', 'AutocompleteWidget', 
19                 'quintagroup.plonecomments', 'quintagroup.quills.extras']
20PLONE_DEPS = ['QuillsEnabled', 'AutocompleteWidget']
21
22if QPC_PACKAGE:
23    PLONE_INSTALL += ['quintagroup.plonecomments',]
24else:
25    PLONE_INSTALL += ['qPloneComments',]
26    PLONE_DEPS    += ['qPloneComments',]
27
28@onsetup
29def setup_quillsextras_policy():
30    """The @onsetup decorator causes the execution of this body to be deferred
31    until the setup of the Plone site testing layer.
32    """
33    # Load the ZCML configuration for the quintagroup.quills.extras package
34    # and its dependencies
35    fiveconfigure.debug_mode = True
36    import quintagroup.quills.extras
37    zcml.load_config('configure.zcml', quintagroup.quills.extras)
38    zcml.load_config('overrides.zcml', quintagroup.quills.extras)
39    if QPC_PACKAGE:
40        import quintagroup.plonecomments
41        zcml.load_config('configure.zcml', quintagroup.plonecomments)
42        zcml.load_config('overrides.zcml', quintagroup.plonecomments)
43        ztc.installPackage('quintagroup.plonecomments')
44
45    fiveconfigure.debug_mode = False
46
47
48for p in PLONE_INSTALL:
49    ztc.installProduct(p)
50
51setup_quillsextras_policy()
52ptc.setupPloneSite(products=PLONE_INSTALL)
53
54import patches
Note: See TracBrowser for help on using the repository browser.