Last change
on this file since 3216 was
3144,
checked in by vmaksymiv, 13 years ago
|
pyflakes fixes
|
-
Property svn:eol-style set to
native
|
File size:
847 bytes
|
Line | |
---|
1 | from Products.Five import zcml |
---|
2 | from Products.Five import fiveconfigure |
---|
3 | |
---|
4 | from Testing import ZopeTestCase as ztc |
---|
5 | from Products.PloneTestCase.layer import onsetup |
---|
6 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
7 | |
---|
8 | from quintagroup.captcha.core import utils |
---|
9 | |
---|
10 | PATCH_WORDS = """heart |
---|
11 | glass |
---|
12 | blue |
---|
13 | false |
---|
14 | burn |
---|
15 | """ |
---|
16 | |
---|
17 | |
---|
18 | def testPatch(): |
---|
19 | # PATCH dictionary for captcha testing |
---|
20 | class TestData(object): |
---|
21 | words = PATCH_WORDS |
---|
22 | |
---|
23 | utils.basic_english = TestData() |
---|
24 | utils.CAPTCHAS_COUNT = len(utils.basic_english.words.split()) |
---|
25 | # END OF PATCH |
---|
26 | |
---|
27 | |
---|
28 | @onsetup |
---|
29 | def setup_product(): |
---|
30 | fiveconfigure.debug_mode = True |
---|
31 | import quintagroup.captcha.core |
---|
32 | zcml.load_config('configure.zcml', quintagroup.captcha.core) |
---|
33 | fiveconfigure.debug_mode = False |
---|
34 | ztc.installPackage('quintagroup.captcha.core') |
---|
35 | |
---|
36 | setup_product() |
---|
37 | ptc.setupPloneSite() |
---|
Note: See
TracBrowser
for help on using the repository browser.