[1214] | 1 | # -*- coding: utf-8 -*- |
---|
| 2 | from Products.Five import zcml |
---|
| 3 | from Products.Five import fiveconfigure |
---|
| 4 | from Testing import ZopeTestCase as ztc |
---|
| 5 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
| 6 | from Products.PloneTestCase.layer import onsetup |
---|
| 7 | |
---|
| 8 | ZOPE_DEPS = [] |
---|
| 9 | PLONE_INSTALL = ['QuillsEnabled', 'AutocompleteWidget', |
---|
| 10 | 'quintagroup.plonecomments', 'quintagroup.quills.extras'] |
---|
| 11 | PLONE_DEPS = ['QuillsEnabled', 'AutocompleteWidget'] |
---|
| 12 | |
---|
| 13 | @onsetup |
---|
| 14 | def setup_quillsextras_policy(): |
---|
| 15 | """The @onsetup decorator causes the execution of this body to be deferred |
---|
| 16 | until the setup of the Plone site testing layer. |
---|
| 17 | """ |
---|
| 18 | # Load the ZCML configuration for the quintagroup.quills.extras package |
---|
| 19 | # and its dependencies |
---|
| 20 | fiveconfigure.debug_mode = True |
---|
| 21 | import quintagroup.plonecomments |
---|
| 22 | import quintagroup.quills.extras |
---|
| 23 | zcml.load_config('configure.zcml', quintagroup.plonecomments) |
---|
| 24 | zcml.load_config('overrides.zcml', quintagroup.plonecomments) |
---|
| 25 | zcml.load_config('configure.zcml', quintagroup.quills.extras) |
---|
| 26 | zcml.load_config('overrides.zcml', quintagroup.quills.extras) |
---|
| 27 | fiveconfigure.debug_mode = False |
---|
| 28 | |
---|
| 29 | ztc.installPackage('quintagroup.plonecomments') |
---|
| 30 | |
---|
| 31 | for p in PLONE_INSTALL: |
---|
| 32 | ztc.installProduct(p) |
---|
| 33 | |
---|
| 34 | setup_quillsextras_policy() |
---|
| 35 | ptc.setupPloneSite(products=PLONE_INSTALL) |
---|