Last change
on this file since 2096 was
2096,
checked in by mylan, 14 years ago
|
#174: added tests bases
|
-
Property svn:eol-style set to
native
|
File size:
834 bytes
|
Rev | Line | |
---|
[2096] | 1 | import re |
---|
| 2 | import unittest |
---|
| 3 | |
---|
| 4 | from Products.Five import zcml |
---|
| 5 | from Products.Five import fiveconfigure |
---|
| 6 | from Testing import ZopeTestCase as ztc |
---|
| 7 | from Products.PloneTestCase.layer import onsetup |
---|
| 8 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
| 9 | |
---|
| 10 | PRODUCTS = [ |
---|
| 11 | 'Products.PloneFormGen', |
---|
| 12 | 'quintagroup.captcha.core', |
---|
| 13 | 'quintagroup.pfg.captcha', |
---|
| 14 | ] |
---|
| 15 | PROFILES = [p+':default' for p in PRODUCTS] |
---|
| 16 | |
---|
| 17 | @onsetup |
---|
| 18 | def setup_product(): |
---|
| 19 | fiveconfigure.debug_mode = True |
---|
| 20 | import quintagroup.pfg.captcha |
---|
| 21 | zcml.load_config('configure.zcml', quintagroup.pfg.captcha) |
---|
| 22 | fiveconfigure.debug_mode = False |
---|
| 23 | ztc.installPackage('quintagroup.pfg.captcha') |
---|
| 24 | ztc.installPackage('quintagroup.captcha.core') |
---|
| 25 | |
---|
| 26 | setup_product() |
---|
| 27 | ptc.setupPloneSite(extension_profiles=PROFILES) |
---|
| 28 | |
---|
| 29 | |
---|
| 30 | def test_suite(): |
---|
| 31 | suite = unittest.TestSuite() |
---|
| 32 | return suite |
---|
Note: See
TracBrowser
for help on using the repository browser.