Changeset 1991 in products
- Timestamp:
- Mar 24, 2010 1:06:44 PM (14 years ago)
- Location:
- quintagroup.captcha.core/trunk/quintagroup/captcha/core/tests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.captcha.core/trunk/quintagroup/captcha/core/tests/base.py
r1984 r1991 12 12 from Products.PloneTestCase.PloneTestCase import portal_owner 13 13 from Products.PloneTestCase.PloneTestCase import default_password 14 from Products.CMFCore.utils import getToolByName 14 15 15 16 from quintagroup.captcha.core.config import * 17 from quintagroup.captcha.core import utils 16 18 from quintagroup.captcha.core.utils import getWord, decrypt, parseKey, encrypt1 17 19 18 # PATCH dictionary for captcha testing 19 from Products.CMFCore.utils import getToolByName 20 class TestData(object): 21 words = """heart 20 PATCH_WORDS = """heart 22 21 glass 23 22 blue … … 25 24 burn 26 25 """ 26 def testPatch(): 27 # PATCH dictionary for captcha testing 28 class TestData(object): 29 words = PATCH_WORDS 27 30 28 from quintagroup.captcha.core import utils 29 utils.basic_english = TestData() 30 utils.CAPTCHAS_COUNT = len(utils.basic_english.words.split()) 31 # END OF PATCH 31 utils.basic_english = TestData() 32 utils.CAPTCHAS_COUNT = len(utils.basic_english.words.split()) 33 # END OF PATCH 32 34 33 35 @onsetup -
quintagroup.captcha.core/trunk/quintagroup/captcha/core/tests/testWidget.py
r1975 r1991 7 7 8 8 NOT_VALID = re.compile("Please re\-enter validation code") 9 10 # patch to use test images and dictionary 11 testPatch() 9 12 10 13 class TestCaptchaWidget(ptc.FunctionalTestCase):
Note: See TracChangeset
for help on using the changeset viewer.