Last change
on this file since 3128 was
3128,
checked in by vmaksymiv, 13 years ago
|
pep8 fixes
|
-
Property svn:eol-style set to
native
|
File size:
1.2 KB
|
Line | |
---|
1 | import unittest |
---|
2 | import os |
---|
3 | import sys |
---|
4 | import re |
---|
5 | |
---|
6 | from Products.Five import zcml |
---|
7 | from Products.Five import fiveconfigure |
---|
8 | |
---|
9 | from Testing import ZopeTestCase as ztc |
---|
10 | from Products.PloneTestCase.layer import onsetup |
---|
11 | from Products.PloneTestCase import PloneTestCase as ptc |
---|
12 | from Products.PloneTestCase.PloneTestCase import portal_owner |
---|
13 | from Products.PloneTestCase.PloneTestCase import default_password |
---|
14 | from Products.CMFCore.utils import getToolByName |
---|
15 | |
---|
16 | from quintagroup.captcha.core.config import * |
---|
17 | from quintagroup.captcha.core import utils |
---|
18 | from quintagroup.captcha.core.utils import getWord, decrypt, parseKey, encrypt1 |
---|
19 | |
---|
20 | PATCH_WORDS = """heart |
---|
21 | glass |
---|
22 | blue |
---|
23 | false |
---|
24 | burn |
---|
25 | """ |
---|
26 | |
---|
27 | |
---|
28 | def testPatch(): |
---|
29 | # PATCH dictionary for captcha testing |
---|
30 | class TestData(object): |
---|
31 | words = PATCH_WORDS |
---|
32 | |
---|
33 | utils.basic_english = TestData() |
---|
34 | utils.CAPTCHAS_COUNT = len(utils.basic_english.words.split()) |
---|
35 | # END OF PATCH |
---|
36 | |
---|
37 | |
---|
38 | @onsetup |
---|
39 | def setup_product(): |
---|
40 | fiveconfigure.debug_mode = True |
---|
41 | import quintagroup.captcha.core |
---|
42 | zcml.load_config('configure.zcml', quintagroup.captcha.core) |
---|
43 | fiveconfigure.debug_mode = False |
---|
44 | ztc.installPackage('quintagroup.captcha.core') |
---|
45 | |
---|
46 | setup_product() |
---|
47 | ptc.setupPloneSite() |
---|
Note: See
TracBrowser
for help on using the repository browser.