Changeset 2806 in products for quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/tests/test_doctests.py
- Timestamp:
- Sep 13, 2010 3:59:31 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.formlib.captcha/trunk/quintagroup/formlib/captcha/tests/test_doctests.py
r2801 r2806 10 10 from Products.PloneTestCase.layer import PloneSite 11 11 from Testing import ZopeTestCase as ztc 12 13 from quintagroup.captcha.core.utils import * 14 from quintagroup.captcha.core.tests.base import testPatch 15 from quintagroup.captcha.core.tests.testWidget import addTestLayer 12 16 13 17 class FormlibCaptchaLayer(PloneSite): … … 28 32 ptc.setupPloneSite(extension_profiles=['quintagroup.captcha.core:default',]) 29 33 30 31 34 class FormlibCaptchaTestCase(ptc.FunctionalTestCase): 32 35 layer = FormlibCaptchaLayer 36 37 def afterSetUp(self): 38 # prepare context 39 self.loginAsPortalOwner() 40 testPatch() 41 addTestLayer(self) 42 # prepare captcha data 43 captcha_key = self.portal.captcha_key 44 self.hashkey = self.portal.getCaptcha() 45 decrypted = decrypt(captcha_key, self.hashkey) 46 self.captcha_word = getWord(int(parseKey(decrypted)['key'])-1 ) 47 33 48 34 49 def test_suite():
Note: See TracChangeset
for help on using the changeset viewer.