Last change
on this file since 3556 was
3556,
checked in by vmaksymiv, 12 years ago
|
PPP fixes
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2755] | 1 | from Products.Five import zcml |
---|
| 2 | from Products.Five import fiveconfigure |
---|
| 3 | |
---|
| 4 | from Testing import ZopeTestCase as ztc |
---|
| 5 | |
---|
| 6 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
| 7 | from Products.PloneTestCase.layer import onsetup |
---|
| 8 | |
---|
[3556] | 9 | |
---|
[2755] | 10 | @onsetup |
---|
| 11 | def setup_product(): |
---|
| 12 | """Set up additional products and ZCML required to test this product. |
---|
| 13 | |
---|
| 14 | The @onsetup decorator causes the execution of this body to be deferred |
---|
| 15 | until the setup of the Plone site testing layer. |
---|
| 16 | """ |
---|
| 17 | |
---|
| 18 | # Load the ZCML configuration for this package and its dependencies |
---|
| 19 | |
---|
| 20 | fiveconfigure.debug_mode = True |
---|
| 21 | import quintagroup.portlet.collection |
---|
| 22 | zcml.load_config('configure.zcml', quintagroup.portlet.collection) |
---|
| 23 | fiveconfigure.debug_mode = False |
---|
| 24 | |
---|
| 25 | # We need to tell the testing framework that these products |
---|
| 26 | # should be available. This can't happen until after we have loaded |
---|
| 27 | # the ZCML. |
---|
| 28 | |
---|
| 29 | ztc.installPackage('quintagroup.portlet.collection') |
---|
| 30 | |
---|
| 31 | # The order here is important: We first call the deferred function and then |
---|
| 32 | # let PloneTestCase install it during Plone site setup |
---|
| 33 | |
---|
| 34 | setup_product() |
---|
| 35 | ptc.setupPloneSite(products=['quintagroup.portlet.collection']) |
---|
| 36 | |
---|
[3556] | 37 | |
---|
[2755] | 38 | class TestCase(ptc.PloneTestCase): |
---|
| 39 | """Base class used for test cases |
---|
| 40 | """ |
---|
| 41 | |
---|
[3556] | 42 | |
---|
[2755] | 43 | class FunctionalTestCase(ptc.FunctionalTestCase): |
---|
| 44 | """Test case class used for functional (doc-)tests |
---|
| 45 | """ |
---|
Note: See
TracBrowser
for help on using the repository browser.