source: products/quintagroup.captcha.core/trunk/quintagroup/captcha/core/tests/base.py @ 3216

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 
1from Products.Five import zcml
2from Products.Five import fiveconfigure
3
4from Testing import ZopeTestCase as ztc
5from Products.PloneTestCase.layer import onsetup
6from Products.PloneTestCase import PloneTestCase as ptc
7
8from quintagroup.captcha.core import utils
9
10PATCH_WORDS = """heart
11glass
12blue
13false
14burn
15"""
16
17
18def 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
29def 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
36setup_product()
37ptc.setupPloneSite()
Note: See TracBrowser for help on using the repository browser.