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